jgauffin / Griffin.Framework

Application framework for Business Applications
http://griffinframework.net
168 stars 63 forks source link

WebSocket implementation #14

Closed campersau closed 9 years ago

campersau commented 9 years ago

Implements the websocket protocol base on https://github.com/sta/websocket-sharp.

The WebSocketListener extends the HttpListener and handles incoming Upgrade: websocket messages. It adds three events WebSocketClientConnect, WebSocketClientConnected and WebSocketClientDisconnected for incoming websocket connections and a WebSocketMessageReceived MessageHandler.

The listener automatically encodes and decodes WebSocketMessages with the WebSocketEncoder and WebSocketDecoder which are wrapping the HttpMessageEncoder / HttpMessageDecoder.

The WebSocketFrame and its enums are almost identical to https://github.com/sta/websocket-sharp.

Closes #7