Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let socketio = require('socket.io');
- let socketioauth = require('socketio-auth');
- function Socket(app) {
- this.connections = {};
- let io = socketio(app);
- socketioauth(io, {
- authenticate: this.auth,
- postAuthenticate: this.postAuth,
- disconnect: this.disconnect,
- timeout: 30 * 1000 // 30 seconds timeout
- });
- }
- module.exports = Socket;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement