You can have a socket.io code call some javascript and set the cookie but imagine how insecure this would be.