Prepare to check against master branch

This commit is contained in:
Roy Hyunjin Han 2015-02-22 14:17:24 -05:00
commit ebd18b7017
3 changed files with 75 additions and 38 deletions

View file

@ -18,6 +18,10 @@ class EngineIONamespace(LoggingMixin):
'Define a callback to handle an event emitted by the server'
self._callback_by_event[event] = callback
def send(self, data):
'Send a message'
self._io.send(data)
def on_open(self):
"""Called after engine.io connects.
You can override this method."""
@ -63,6 +67,18 @@ class SocketIONamespace(EngineIONamespace):
self.path = path
super(SocketIONamespace, self).__init__(io)
def connect(self):
self._io.connect(self.path)
def disconnect(self):
self._io.disconnect(self.path)
def emit(self, event, *args, **kw):
self._io.emit(event, *args, **kw)
def send(self, data='', callback=None):
self._io.send(data, callback)
def on_connect(self):
"""Called after socket.io connects.
You can override this method."""