Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // start
- initClientListener()
- new ClientSessionTest()
- initClientListener()
- GET / HTTP/1.1
- Host: localhost:1234
- User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
- Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
- Accept-Encoding: gzip, deflate
- Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
- Connection: keep-alive, Upgrade
- Sec-WebSocket-Version: 8
- Sec-WebSocket-Origin: http://localhost
- Sec-WebSocket-Protocol: chat
- Sec-WebSocket-Extensions: deflate-stream
- Pragma: no-cache
- Cache-Control: no-cache
- Upgrade: websocket
- empty line
- // empty line found -> send following lines back to client
- HTTP/1.1 101 Switching Protocols
- Upgrade: websocket
- Connection: Upgrade
- Sec-WebSocket-Accept: Eae8JqZiarTzWSLIScHc4n5VFtU=
- Sec-WebSocket-Protocol: chat
- Content-Encoding: identity
- // messages from client.
- // the first line is the message printed as string without any format conversion
- // the second line shows the byte value of each character
- ?……XTxé98?
- -127 -123 -123 88 84 120 -23 57 56 25 -113
- ?…Š×¶æ¶Ús€
- -127 -123 -118 -41 -74 18 -26 -74 -38 115 -128
- ?…Á÷Ì|›Ë
- -127 -123 -63 29 -9 -52 -83 124 -101 -83 -53
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement