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.
- physicsworks-1.0.0.dist-info/METADATA +28 -0
- physicsworks-1.0.0.dist-info/RECORD +28 -0
- physicsworks-1.0.0.dist-info/WHEEL +5 -0
- physicsworks-1.0.0.dist-info/top_level.txt +1 -0
- physicsworks_python/__init__.py +1 -0
- physicsworks_python/events/Geometry.py +15 -0
- physicsworks_python/events/Mesh.py +6 -0
- physicsworks_python/events/__init__.py +11 -0
- physicsworks_python/greet.py +3 -0
- physicsworks_python/nats/__init__.py +0 -0
- physicsworks_python/nats/listener.py +34 -0
- physicsworks_python/nats/publisher.py +15 -0
- physicsworks_python/runner/__init__.py +44 -0
- physicsworks_python/runner/config.py +68 -0
- physicsworks_python/runner/core.py +357 -0
- physicsworks_python/runner/executor.py +606 -0
- physicsworks_python/runner/interface.py +39 -0
- physicsworks_python/runner/logger.py +37 -0
- physicsworks_python/runner/server.py +260 -0
- physicsworks_python/runner/template.py +402 -0
- physicsworks_python/runner/utils.py +234 -0
- physicsworks_python/runner/watcher.py +357 -0
- physicsworks_python/threejs.py +19 -0
- physicsworks_python/wrappers/MongoClientWrapper.py +29 -0
- physicsworks_python/wrappers/NatsClientWrapper.py +62 -0
- physicsworks_python/wrappers/SocketIOClientWrapper.py +23 -0
- physicsworks_python/wrappers/SocketIOServerWrapper.py +18 -0
- physicsworks_python/wrappers/__init__.py +0 -0
|
@@ -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
|