You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
359 B

import socketio
sio = socketio.Client()
@sio.event
def connect():
print("connected to server")
@sio.event
def disconnect(reason):
print("disconnected from server, reason:", reason)
@sio.event
def hello(a, b, c):
print(a, b, c)
if __name__ == "__main__":
sio.connect("http://localhost:5000", auth={"token": "my-token"})
sio.wait()