Implementing WebSockets

Alex Egg,

Websockets is the websocket protocal for the server and the API for the client. Usually the server is a webserver and the client a web browser. 

Chrome 10.0.648.204 will send the following headers for a websocket connection request:

 

http://localhost:8080/ws_c.html

 

var connection = new WebSocket('ws://localhost:9999/');

 

Chrome:

 

GET / HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: localhost:9999
Origin: http://localhost:8080
Sec-WebSocket-Key1: 1tm09w98= 13VB742 A
Sec-WebSocket-Key2: 157c2 9  l]1xy 73 xy1i<0=
Cookie: mjx:menu=
 
firefox4 ( w/ websockets enabled):
 
GET / HTTP/1.1
Sec-WebSocket-Key2: ) 24:3k22?672 0  0
Origin: http://localhost:8080
Sec-WebSocket-Key1: 2     5ds18# 'Sn%)2%  3  7s13' 9
Connection: Upgrade
Upgrade: WebSocket
Host: localhost:9999
 
 
 
 

 

Permalink: implementing-websocksts

Tags: websockets, python

Last edited by Alex Egg, 2016-10-05 19:16:35
View Revision History