express.io icon indicating copy to clipboard operation
express.io copied to clipboard

Add Socket listeners

Open rohit8 opened this issue 12 years ago • 0 comments

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

rohit8 avatar Aug 01 '13 07:08 rohit8