nyara icon indicating copy to clipboard operation
nyara copied to clipboard

Websocket notes

Open luikore opened this issue 11 years ago • 2 comments

request:

Get /foo HTTP/1.1
Connection: Upgrade
Upgrade: Websocket

response:

HTTP/1.1 101 Websocket Protocol Handshake
Upgrade: Websocket
Connection: Upgrade

http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76

client js:

ws = new WebSocket("ws://foo.com")

solve proxy problem: 80 for normal 443 for tunneled


implementaion notes

client proto

WebSocket.prototype
WebSocket {send: function, close: function, addEventListener: function, removeEventListener: function, dispatchEvent: function…}

server proto (http-parser)

onopen
onclose
onmessage

actions for websocket should should use Nyara::WebSocketController

they share some part with controller but not all, may be a common super class?

luikore avatar Jul 08 '13 08:07 luikore