Edit Page

WebSockets

For a full discussion of realtime concepts in Sails, see the Realtime concept documentation.

For information on client-to-server socket communication, see the Socket Client (sails.io.js).

For information on server-to-client socket communication, see the sails.sockets.

For information on using realtime messages to communicate changes in Sails models, see the Resourceful PubSub reference.

Sails uses socket.io as the underlying engine for realtime communication. Every Sails app has a Socket.IO instance available as sails.io. However, most socket.io functionality is wrapped for convenience (and safety) by a sails.sockets method.

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.

Reference

Reference