Save experiments
This commit is contained in:
parent
2e2496cd4c
commit
7254172545
7 changed files with 121 additions and 0 deletions
16
experiments/client0.py
Normal file
16
experiments/client0.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue