socketio / socket.io-client-java

Full-featured Socket.IO Client Library for Java, which is compatible with Socket.IO v1.0 and later.
https://socketio.github.io/socket.io-client-java/installation.html
Other
5.32k stars 972 forks source link

Can't receive emit from server #671

Closed Joshuaap458 closed 2 years ago

Joshuaap458 commented 3 years ago

So i've managed to connect to the server, and i have an event called "Mobile" and i successfully receive a message from it. However i send a string through an API call from postman the event is "updateData" and i cant seem to receive it on my android emulator. anyone had the issue like this?

server

const socketid = await getRedis(socket-${body.patientId}); io.to(socketid).emit('updateData', 'Refresh1'); io.emit('updateData', 'Refresh2'); io.on('updateData', async (socket) => { socket.emit('updateData', 'Refresh3'); });

client mSocket.on("updateData", new Emitter.Listener() { @Override public void call(Object... args) { for (Object obj : args) { Log.v("test", "updateData " + obj); } } });

Need help guys...

darrachequesne commented 2 years ago

Closed due to inactivity, please reopen if needed.