a .NET websocket client implementation.

It originated from SuperWebSocket WebSocket Client. For better developing of the websocket client, it was separated from SuperWebSocket and was renamed to WebSocket4Net.

WebSocket4Net will provide websocket client implementation for many different kinds of runtime:

  • .Net 2.0
  • .Net 3.5
  • .Net 4.0
  • Mono
  • Silverlight
  • WindowsPhone
  • Xamarin.Android
  • Xamarin.iOS   


It is compatible with many websocket drafts:

  • Hybi-00
  • Hybi-10
  • RFC6455


E-iceblue components provides standalone package solutions for developers to open, create, modify, save, convert and print Word, Excel, PDF and PowerPoint documents on any .NET platform.


NuGet Packagehttp://www.nuget.org/packages/WebSocket4Net

Xamarin Component Packagehttps://components.xamarin.com/view/websocket4net


Demo code:  


using WebSocket4Net;
WebSocket websocket = new WebSocket("ws://localhost:2012/");
websocket.Opened += new EventHandler(websocket_Opened);
websocket.Error += new EventHandler<ErrorEventArgs>(websocket_Error);
websocket.Closed += new EventHandler(websocket_Closed);
websocket.MessageReceived += new EventHandler(websocket_MessageReceived);

private void websocket_Opened(object sender, EventArgs e)
     websocket.Send("Hello World!");



    Bitcoin: 1KwVcdHcH2yNHLJqVJtLfT8uwzKbFNphbb


GitHub Repository: https://github.com/kerryjiang/WebSocket4Net

Recommended .NET WebSocket Server

SuperWebSocket -  http://superwebsocket.codeplex.com/


Consult/feature request:


Author's LinkedIn profile: http://cn.linkedin.com/in/kerryjiang



Last edited Aug 7 at 2:19 AM by kerryjiang, version 55