Hacker News new | past | comments | ask | show | jobs | submit login

Websockets are something I long dreamed about : bidirectional HTTP, no more stupid AJAX polling tricks.



long polling is nice because you don't have to implement a streaming parser on the client side.


Yeah now you just have to deal with this stupidity:

Send the following bytes:

           0D 0A
did that work? ok send the following bytes:

           57 65 62 53 6F 63 6B 65  74 2D 50 72 6F 74 6F 63
           6F 6C 3A 20
etc: https://tools.ietf.org/html/draft-hixie-thewebsocketprotocol...


No, you don't need to. Try putting this in a hex editor. You'll see a http handshake. The first part you need to send is "GET " which is the same as sending the following bytes: "47 45 54 20". It's just made a bit "simpler" so people don't get the encoding wrong (non-ascii characters, etc...).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: