Hi, I running socketIO server using node on my server side. I was able to receive downlink message from the server, however, I could not send uplink message back to the server. Could you please take a look and let me know what am I doing wrong.
from socketIO_client import SocketIO, LoggingNamespace
def on_downlink():
print('connection established...')
socketIO.emit('uplink') #does not work!
with SocketIO('localhost', 8080) as socketIO:
socketIO.on('downlink', on_downlink) #it works
socketIO.off('stop')
#socketIO.emit('uplink') #does not work either!
socketIO.wait()
Here is the node js code
server.listen(PORT, '127.0.0.1');
var socket = io.listen(server);
//socket.set('transports', ['websocket']);
socket.on('connect',
function ()
{
console.log('connected...'); //prints connected on my console log
socket.emit('downlink'); //it works
});
socket.on('uplink',
function ()
{
console.log('uplink...'); //can't get the uplink message
});
Hi, I running socketIO server using node on my server side. I was able to receive downlink message from the server, however, I could not send uplink message back to the server. Could you please take a look and let me know what am I doing wrong.
Here is the node js code