Communicating with a socket.io server via c#

Dested picture Dested · Jun 28, 2011 · Viewed 86.1k times · Source

Is there a c# client that follows the socket.io protocol? I have a socket.io server that is communicating with a socket.io javascript client via a website, but i also need to connect a c# piece to it that can send and receive messages. Is there a clean way to do this currently or will I have to write my own client.

Answer

Jim Stott picture Jim Stott · Feb 16, 2012

There is a project on codeplex ( NuGet as well ) that is a C# client for socket.io. (I am the author of this project - so I'm biased) I couldn't find exactly what I needed in a client, so I built it and released it back into the open.

Example client style:

socket.On("news", (data) =>    {
Console.WriteLine(data);
});