If a logged on user navigates to a certain area of the site which is to use WebSockets, How am I to grab that session Id so I can identify him on the server?
My server is basically an endless while loop which holds information about all connected users and stuff, so in order to grab that id I figured the only suitable moment is at the handshake, but unfortunately the handshake's request headers contain no cookie data:
Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.5
Connection: keep-alive, Upgrade
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
Here's a download link for the files of the server I'm using http://www.4shared.com/rar/7RIos1tuce/PHPWebSocket-Chat-master.html