Edit Page
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.
Want to see for yourself?
An example of this file can be found in our sample app repo, here.
Check out the full Sailsconf 2024 playlist on Youtube
Documentation