def __init__(self, loop, factory, dispatch=Dispatch()): Protocol.__init__(self, loop) self.factory = factory self.dispatch = dispatch self._proxy = None self._proxy_deferreds = [] self.handlers = {0: self.request, 1: self.response, 2: self.notify} self.unpacker = msgpack.Unpacker()
def __init__(self, loop): Protocol.__init__(self, loop) self.reads = 0 self.errors = 0 self.connections = 0 self.losses = 0 self.connected = False self.transport = None self._data = [] self.reason = None
def __init__(self, loop, factory, dispatch=Dispatch()): Protocol.__init__(self, loop) self.factory = factory self.dispatch = dispatch self._proxy = None self._proxy_deferreds = [] self.handlers = {0:self.handle_request, 1:self.handle_notification, 2:self.handle_response, 3:self.handle_error} self._buffer = bytes() self._data_handler = self.data_length
def test_protocol(self): protocol = Protocol(loop)
def __init__(self, loop): Protocol.__init__(self, loop) self.response_cb = None