def __init__(self, url,devel=False,debug=False,info=None,rtt=None): self._base_url = url self._server = utils.random_number_string(1000) self.protocol = "websocket" self.readyState = SockPy.CONNECTING self._connid = utils.random_string(8) self._trans_url = self._base_url + '/' + self._server + '/' + self._connid self._transport = None REventTarget.__init__(self)
def __init__(self,url,devel=False,debug=False,info=None,rtt=None): self.sockConn = SockPy(url,devel=devel,debug=debug,info=info,rtt=rtt) self.handlerMap = {} self.replyHandlers = {} self.state = EventBus.CONNECTING self.sockConn.addEventListener("open", self.onopen) self.sockConn.addEventListener("close", self.onclose) self.sockConn.addEventListener("message", self.onmessage) REventTarget.__init__(self)
def __init__(self, url, devel=False, debug=False, info=None, rtt=None): self.sockConn = SockPy(url, devel=devel, debug=debug, info=info, rtt=rtt) self.handlerMap = {} self.replyHandlers = {} self.state = EventBus.CONNECTING self.sockConn.addEventListener("open", self.onopen) self.sockConn.addEventListener("close", self.onclose) self.sockConn.addEventListener("message", self.onmessage) REventTarget.__init__(self)