physicsworks 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ import socketio
2
+
3
+ sio = socketio.Client()
4
+
5
+
6
+ @sio.event
7
+ def connect():
8
+ print('connection established')
9
+
10
+
11
+ @sio.event
12
+ def my_message(data):
13
+ print('message received with ', data)
14
+ sio.emit('my response', {'response': 'my response'})
15
+
16
+
17
+ @sio.event
18
+ def disconnect():
19
+ print('disconnected from server')
20
+
21
+
22
+ sio.connect('http://localhost:5000')
23
+ sio.wait()
@@ -0,0 +1,18 @@
1
+ import socketio
2
+
3
+ sio = socketio.AsyncServer()
4
+
5
+
6
+ @sio.event()
7
+ def connect(sid, environ):
8
+ print('connect ', sid)
9
+
10
+
11
+ @sio.event
12
+ def my_message(sid, data):
13
+ print('message ', data)
14
+
15
+
16
+ @sio.event
17
+ def disconnect(sid):
18
+ print('disconnect ', sid)
File without changes