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.
listen(port); // Create a Socket.IO instance, passing it our server var socket = io. listen(server); // Add a connect listener socket. on('connection', function(client){ console. log('Connection to client established'); // Success!
The Socket.IO library keeps an open TCP connection to the server, which may result in a high battery drain for your users.
Websocket is created when you make upgrade from http to websocket, so it kind of does need http. socket.io isn't a pure Websocket server/implementation, it depends on HTTP for its initial connection setup.
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); });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With