1import socketio
2
3sio = socketio.Client()
4logger.info('Created socketio client')
5
6@sio.event
7def connect():
8 logger.info('connected to server')
9
10@sio.event
11def disconnect():
12 logger.info('disconnected from server')
13
14sio.connect('https://server.com/socket.io/')
15sio.wait()
1import socketio
2
3sio = socketio.Client()
4logger.info('Created socketio client')
5sio.connect('https://server.com/socket.io/')
6
7@sio.event
8def connect():
9 logger.info('connected to server')
10
11@sio.event
12def disconnect():
13 logger.info('disconnected from server')