Skip to content

Commit

Permalink
Update examples/client.py from pyropy#32
Browse files Browse the repository at this point in the history
  • Loading branch information
Artucuno committed Nov 26, 2023
1 parent 87d8a48 commit 13955c9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions examples/client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import socketio

sio = socketio.Client()


@sio.event
def connect():
print("Connected!")


@sio.on('test')
def on_message(data):
print('Message Received! >> ', data)
sio.emit('test', 'Hello world!')


sio.connect('http://127.0.0.1:8000')
sio.wait()

0 comments on commit 13955c9

Please sign in to comment.