orvyl orvyl - 1 year ago 73
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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download