express.io
express.io copied to clipboard
Add Socket listeners
I am working on making my express.io app compatible with file uploads. I want to use a library like deliver.js (github.com/liamks/Delivery.js) or like socket.io-stream (github.com/nkzawa/socket.io-stream) which listens to an individual socket when a socket.io connection is opened. For example:
io.sockets.on('connection', function(socket){
var delivery = dl.listen(socket);
//rest of the code here
});
The only way I am aware of to access a socket is by accessing req.socket in
app.io.route('routename', function(req) {
//req.socket is accessible
});
Is it possible for me to use libraries made for socket.io in express.io?
EDIT: Please let me know if there is a better alternative for file uploads using express.io
Thanks, Rohit