Back to Sails

config/sockets.js

docs/anatomy/config/sockets.js.md

12.12.2000815 B
Original Source

config/sockets.js

This is a configuration file that allows you to customize the way your app talks to clients over Socket.IO.

It provides transparent access to Sails' encapsulated pubsub/socket server for complete customizability. In it you can do things on the list below (and more!).

  • Override afterDisconnect function (server side)
  • Define custom authorization logic for client socket connections
  • Set transport method
  • Change Heartbeat Interval
  • Change socket store

More Info

Socket.IO configuration options can be found here.

Usage

See sails.config.sockets for all available options.

<docmeta name="displayName" value="sockets.js">