WebSockets is a communication protocol on TCP between a web browser (or other client) and a server. It is full-duplex, event-driven. One important advantage of the technology is the elimination of the client polling of the server. The following post lists some resources for C# WebSockets (1).
C#/WebSocket Resources
- System.Net.WebSockets (client only)
- https://www.nuget.org/packages/System.Net.WebSockets/
- First release Monday, June 27, 2016
- http://www.infoworld.com/article/3088338/application-development/how-to-work-with-web-sockets-in-net.html
- Cannot target NET Portable 4.5 framework.
- WebSocket4Net (client only)
- http://websocket4net.codeplex.com/, Last updated Wednesday, August 24, 2016
- https://www.nuget.org/packages/WebSocket4Net, Last updated Wednesday, August 24, 2016
- Cannot target NET Portable 4.5 framework.
- WebSocket Portable (client only, deprecated, see WebSockets.PCL)
- https://github.com/NVentimiglia/WebSocket.Portable
- https://www.nuget.org/packages/WebSocket.Portable.Core/, Last updated Monday, October 5, 2015
- WebSockets.PCL (client)
- https://github.com/NVentimiglia/WebSockets.Pcl
- https://www.nuget.org/packages/Websockets.Pcl/, last updated Friday, March 25, 2016
- Fleck (server only)
- https://github.com/statianzo/Fleck
- https://www.nuget.org/packages/Fleck/, last updated Monday, July 20, 2015
- WebSocketListener (server)
- http://vtortola.github.io/WebSocketListener/
- https://www.nuget.org/packages/vtortola.WebSocketListener/, last updated August 21, 2016
- SuperWebSocket (server)
- At least two versions, both of which seem unmaintained since 2014.
- https://www.nuget.org/packages/SuperWebSocket/
- https://www.nuget.org/packages/SuperWebSocketNETServer/
- SuperSocket (server)
- http://www.supersocket.net/
- http://supersocket.codeplex.com/releases/view/620564
- Last updated March 24, 2016
- Owin.WebSocket (server only)
- https://www.nuget.org/packages/Owin.WebSocket/
- Updated in January 2016
- PowerWebSockets (proprietary, client and server)
- XSockets (proprietary)
- websocket-sharp
- https://github.com/sta/websocket-sharp, last updated August 24, 2016
- https://www.nuget.org/packages/WebSocketSharp (pre-release, newer available)
- http://sta.github.io/websocket-sharp/
- $15?
- SocketRocket (client)
- https://www.nuget.org/packages/Square.SocketRocket/, last updated Tuesday, July 26, 2016
- https://github.com/mattleibow/square-bindings
- SignalR (client and server, ASP.NET)
Articles on Web Sockets
https://tools.ietf.org/html/rfc6455
https://tools.ietf.org/html/rfc7936
https://en.wikipedia.org/wiki/WebSocket
https://www.websocket.org/index.html
https://en.wikipedia.org/wiki/Comparison_of_WebSocket_implementations
http://www.codeproject.com/Articles/1063910/WebSocket-Server-in-Csharp
http://www.codeproject.com/Articles/617611/Using-WebSocket-in-NET-4-5-Part-1
http://www.codeproject.com/Articles/618032/Using-WebSocket-in-NET-Part
http://www.codeproject.com/Articles/619343/Using-WebSocket-in-NET-Part
http://www.codeproject.com/Articles/620731/Using-WebSocket-in-NET-Part
Note:
- Initial list from http://stackoverflow.com/questions/33467089/net-websocket-client-and-server-library
- Although it was suggested in a StackOverflow.com discussion to use “Sockets for PCL“, that is not a viable solution because the library is for TCP sockets not WebSockets.