Based from the official site of socket.io http://socket.io/#how-to-use, I can't find any terminologies.
What are the differences between socket.emit
, socket.on
, and socket.send
? Can't find articles which differentiate between these things. I am currently developing a real-time application.
socket.emit
- This method is responsible for sending messages.
socket.on
- This method is responsible for listening for incoming messages.
socket.end
- This is the first time I'm hearing such a method. I am not really sure that it exists.
socket.emit
Creates events to send datasocket.on
listens for specific events to collect datasocket.send
Sends events of the name message
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With