Skip to content
This repository was archived by the owner on Apr 4, 2024. It is now read-only.

Commit 13955c9

Browse files
committed
Update examples/client.py from #32
1 parent 87d8a48 commit 13955c9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

examples/client.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import socketio
2+
3+
sio = socketio.Client()
4+
5+
6+
@sio.event
7+
def connect():
8+
print("Connected!")
9+
10+
11+
@sio.on('test')
12+
def on_message(data):
13+
print('Message Received! >> ', data)
14+
sio.emit('test', 'Hello world!')
15+
16+
17+
sio.connect('http://127.0.0.1:8000')
18+
sio.wait()

0 commit comments

Comments
 (0)