How do I set and read a cookie using socket.io?

I'm using socket.io in my node.js app and I'm trying to set a simple cookie and read back the value of the cookie later. How do I do that with socket.io? Does it support this natively or do I need to write client-side functions for manipulating cookies and then create socket.io events to use them?

socket.io can use different transport mechanisms (http://socket.io/#browser-support), e.g. flash raw sockets. They're not related to common HTTP connection at all, hence it's better to set cookie manually at client-side.

Setting cookies won't affect that flash connection at all, though. You may need to manually not only generate some token, but also bypass it as connection parameter.