def dataReceived(self, data): """ When gossip data is received. """ debug("DATA RECEIVED BOOYAH!", success=True, threshold=1) if len(data) == 32: connections.assignTransport(data, self.transport) else: try: msg = message.buildMessage(data) msg.respond() # just respond polymorphically. except: debug(data, error=True)
def dataReceived(self, data): """ Data received? this seems a little odd. """ debug("Data received via client", strange=True, threshold=1) if len(data) == 32: connections.assignTransport(data, self.transport) else: try: msg = message.buildMessage(data) msg.respond() except: debug("data: " + data, error=True)