示例#1
0
 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()
示例#2
0
 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()
示例#3
0
文件: mocks.py 项目: bfrog/whizzer
 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
示例#4
0
 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
示例#5
0
 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
示例#6
0
文件: watchman.py 项目: zlandau/codie
 def __init__(self, loop):
     Protocol.__init__(self, loop)
     self.response_cb = None