• Stars
    star
    786
  • Rank 55,573 (Top 2 %)
  • Language
    C#
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Socket.IO Client Library for .Net

THIS PROJECT IS DEPRECATED

Component is not maintained anymore. See Quobject/EngineIoClientDotNet#69 for more information.

SocketIoClientDotNet

====================

Socket.IO Client Library for .Net

  • NuGet Package: SocketIoClientDotNet

This is the Socket.IO Client Library for C#, which is ported from the JavaScript client version 1.1.0.

See also: EngineIoClientDotNet

Installation

Nuget install:

Install-Package SocketIoClientDotNet

Usage

SocketIoClientDotNet has a similar api to those of the JavaScript client.

using Quobject.SocketIoClientDotNet.Client;

var socket = IO.Socket("http://localhost");
socket.On(Socket.EVENT_CONNECT, () =>
{
	socket.Emit("hi");
	
});

socket.On("hi", (data) =>
	{
		Console.WriteLine(data);
		socket.Disconnect();
	});
Console.ReadLine();

More examples can be found in unit tests acting against the test server.

Features

This library supports all of the features the JS client does, including events, options and upgrading transport.

Framework Versions

.NETFramework v3.5, .NETFramework v4.0, .NETFramework v4.5

License

MIT