Thread: TSockets
View Single Post
  #8  
Old 04-14-2012, 06:08 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Did you look at the WebSocket protocol (RFC)? A quick read of the opening handshake indicates that you're going to have to reply with a 101 status code and a Sec-WebSocket-Accept header; see the RFC for how to get the value for that header.

Quote:
Originally Posted by Example Response Headers, RFC 6455
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
Once you've completed the handshake you can worry about sending data.

I don't know why you're using WebSockets for this anyway. You shouldn't need to talk from a browser -> the Graal server directly, so do it via some serverside language with regular old sockets.
__________________
Reply With Quote