Advertisement
CrushedPixel

Untitled

Jan 29th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. let socketio = require('socket.io');
  2. let socketioauth = require('socketio-auth');
  3.  
  4. function Socket(app) {
  5. this.connections = {};
  6.  
  7. let io = socketio(app);
  8. socketioauth(io, {
  9. authenticate: this.auth,
  10. postAuthenticate: this.postAuth,
  11. disconnect: this.disconnect,
  12. timeout: 30 * 1000 // 30 seconds timeout
  13. });
  14. }
  15.  
  16. module.exports = Socket;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement