I just started looking at examples for connecting to a websocket in C# and realised they all use .NET 4.5. I'm using Visual Studio 2010 in Windows 7 - are there any examples or libraries available for this?
Asked
Active
Viewed 1.7k times
6
-
does this help? http://stackoverflow.com/questions/2211898 – Sanjeevakumar Hiremath Oct 04 '12 at 01:45
-
No, I'm looking to connect to a websocket not setup a server. – parsley72 Oct 04 '12 at 01:49
3 Answers
5
I ended up using websocket-sharp - very easy to build and use.

parsley72
- 8,449
- 8
- 65
- 98
-
The problem is that they don't have any releases. You're stuck with using master branch and recompiling it yourself. – krl Apr 08 '16 at 09:37
2
- You can use SuperWebSocket as websocket server and Websocket4net as websocket client.

Siuli31
- 31
- 2
2
You cannot host web sockets on IIS 7.5 but you can host your own web server using Fleck
You can download it from github or type fleck in nuget.
Create your webserver socket
// Create Websocket server
websocketServer = new Fleck.WebSocketServer("ws://localhost:82");
websocketServer.Start(socket =>
{
socket.OnOpen = () => Console.WriteLine("Open!");
socket.OnClose = () => Console.WriteLine("Close!");
socket.OnMessage = message => socket.Send(message);
});

Dennis Nerush
- 5,473
- 5
- 25
- 33