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.
 
 

18 lines
281 B

import socketio
# standard Python
sio = socketio.Client()
@sio.event
def connect():
print("I'm connected!")
@sio.event
def connect_error():
print("The connection failed!")
@sio.on('message')
def on_message(data):
print('frame', data)
sio.connect('http://localhost:8888')