I use a node.js server to send data to python client. Python's console display good receiving the data, but i can't find in documentation a way to use them in the Python's Client.
In Python's script console :
engineio.client - INFO - Received packet MESSAGE data 2/flowRecognizedFairy,["myevent",{"spoken":"i'm speaking now"}]
I tried several examples found in the API Documentation!.
@sio.event
def message(data):
print('I received a message!')
@sio.on('my message')
def on_message(data):
print('I received a message!')
@sio.event
async def message(data):
print('I received a message!')
I can't print nothing in console with those. Following code works :
@sio.on('connect')
def on_connect():
print('--> connection established')
@sio.on('disconnect')
def on_disconnect():
print('--> disconnected from server')
No error message. I'm expecting to firstly print receive data with print function and to use them with another functions in python script.
Any tricks or idea ?