Skip to content

joewen/SocketIoClientDotNet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SocketIoClientDotNet

Socket.IO Client Library for .Net

Fork from https://github.com/Quobject/SocketIoClientDotNet.

  • NuGet Package: SocketIoClientDotNet.Standard

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.Standard

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

.Net Standard 2.0

License

MIT

About

Socket.IO Client Library for .Net

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 82.3%
  • JavaScript 16.8%
  • HTML 0.9%