socket.io-poco icon indicating copy to clipboard operation
socket.io-poco copied to clipboard

socket.send not interpreted as a "message" event socket.emit

Open francoisTemasys opened this issue 11 years ago • 0 comments

On my server side I send a message to the client: socket.emit('message',JSON.stringify(send_msg)); but then if I do socket.send(JSON.stringify(send_msg));

The message is not properly caught and the handleMessage is fired instead of the handleEvent. I have read here: http://stackoverflow.com/questions/11498508/socket-emit-vs-socket-send that send is a "simplified" version of an emit (no custom event, just "message").

I can see in the logger that the message is received but not correctly interpreted.

francoisTemasys avatar Jan 06 '14 09:01 francoisTemasys