Skip to content
Xan-Kun edited this page Jun 8, 2017 · 1 revision

Welcome to the WebSocket4Net wiki!

NuGet Package: http://www.nuget.org/packages/WebSocket4Net

Xamarin Component Package: https://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);
websocket.Open();

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

Donate:

Bitcoin: 1KwVcdHcH2yNHLJqVJtLfT8uwzKbFNphbb

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

Recommended .NET WebSocket Server

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

Consult/feature request:

[email protected]

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

Clone this wiki locally