Search code examples
c#socketsclientwebsocketsocket.io

Communicating with a socket.io server via c#


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.


Solution

  • 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);
    });