orvyl orvyl - 7 months ago 37
Node.js Question

socket.io - socket.emit, socket.on, socket.send

Base from the official site of socket.io http://socket.io/#how-to-use, I cant find any terminologies.
What are the difference between

, and
? Can't find articles which differentiate these things. Im 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.