socketIO-client/experiments/client0.py
Roy Hyunjin Han 7254172545 Save experiments
2014-11-17 18:43:25 -05:00

16 lines
270 B
Python

class SocketIO(object):
def __init__(self, host, port):
pass
def on(self, event, callback):
pass
def on_news(self, data):
print(data)
self.emit('my other event', {'my': 'data'})
s = SocketIO('localhost', 9000)
s.on('news', on_news)