Project - WebSocket Client for .NET and .NETMF

WebSocket Client for .NET and .NETMF

[title]JDI WebSocketClient[/title]

This project implements a full featured WebSocket client for .NET and .NETMF, and includes a .NET Win Forms application and a .NETMF console application to demonstrate how to use the WebSocketClient class.

The design is based on IETF RFC-6455, and has the following features:
[ul]Includes both a .NET and a .NETMF version of the websocket client.
Includes a Win Forms application for demoing and testing.
Includes a MF console application for demoing and testing.
WebSocket Protocol version 13
Opening Handshake negotiation
Sub protocol negotiation
Keep alive with Ping and Pong messages
Closing handshake
Secure SSL/TLS communication
Text messages
Binary messages
Masking of client sent messages
Configurable options:
- Origin
- Sub Protocol
- Extensions (not yet implemented)
- Masking Enabled
- Max Receive Frame Length
- Max Send Queue Size
- Activity Timer Enabled
- Activity Timeout
- Handshake Timeout
- Receive Timeout
- Close Message Response Timeout
- Ping Response Timeout[/ul]

Features not yet implemented:
[ul]Protocol version negotiation
WebSocket extensions
Continuation frames (fragmentation)
Cookie and other headers not directly related to the WebSocket handshake[/ul]

Current limitations:
[ul]Max frame length, which is set with a WSOptions property, determines the max message size.[/ul]

The images shown here are of the MFConsole application Debug Logger output, and the Win Forms window and output.

This project is being maintained on CodePlex at: http://jdiwebsocketclient.codeplex.com/

Most of the code is identical between the .NET version and the .NETMF version. In most cases the actual code files are in the .NET project, and these files are then linked to the .NETMF project.

7 Likes

An excellent contribution

Thank you! I’ve been working on this a while, and finally felt it was good enough to publish. I also have a Pusher client almost ready to publish…

Very cool! Thanks!

really nice contribution :slight_smile:

really nice contribution :slight_smile:

Hi jasdev!

Could you please explain fror me how can I use JDI WebSocketClient with examples for my Gadgeteer project that involves sending information from the mainboard to the server and the server will send information back. I use JSON and the server is written using node.js.

thanks / Sam

@ sam_simsim - Hi Sam. I’m sorry but I don’t own any Gadgeteer boards, so I’m not sure how to convert my plain NETMF project into a Gadgeteer project.