How to set or delete a cookie from io.use

Viewed 818

In the socket.io's Server object, which I will call io for convenience, the use method has access to the Express' request object and also a handshake object. Are these read-only objects?

io.use(function(socket,next)) {
   var req = socket.request;
   //how do I delete or set a cookie here?
   next();
}

I want to delete a cookie. How do I go about doing it?

1 Answers
Related