def recv(): try: callback.emit(self.connection.recv(length)) except Exception: callback.exception = sys.exc_info() callback.emit()
def send(): try: callback.emit(self.connection.send(data)) except Exception: callback.exception = sys.exc_info() callback.emit()
def accept(): try: callback.emit(self.connection.accept()) except Exception: callback.exception = sys.exc_info() callback.emit()