Skip to content

cloverhap/EngineIoClientDotNet

This branch is 37 commits ahead of, 13 commits behind Quobject/EngineIoClientDotNet:master.

Folders and files

NameName
Last commit message
Last commit date
Apr 25, 2018
Aug 25, 2017
Jan 28, 2018
Jul 20, 2017
Aug 9, 2014
Jul 20, 2017

Repository files navigation

EngineIoClientDotNet

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

Engine.IO Client Library for .Net

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

Installation

Nuget install:

Install-Package EngineIoClientDotNet
  • NuGet Package: EngineIoClientDotNet

Usage

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

You can use Socket to connect:

var socket = new Socket("ws://localhost");
socket.On(Socket.EVENT_OPEN, () =>
{
	socket.Send("hi", () =>
	{		
		socket.Close();
	});
});
socket.Open();

Receiving data

var socket = new Socket("ws://localhost");
socket.On(Socket.EVENT_OPEN, () =>
{
	socket.On(Socket.EVENT_MESSAGE, (data) =>
	{
		Console.WriteLine((string)data);
	});
});
socket.Open();            

Features

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

Tests

Run tests on windows or linux:

git clone https://github.com/Quobject/EngineIoClientDotNet.git
cd EngineIoClientDotNet/grunt
npm install

Update config.json and add line to hosts file: 127.0.0.1 testme.quobject.com.

grunt

This will start test server and xunit tests for windows.

In linux this will stop after starting test server. Start xunit tests within a new linux terminal:

grunt testClient

Framework Versions

.NETFramework v3.5, .NETFramework v4.0, .NETFramework v4.4, .NETStandard v1.3,

License

MIT

About

Engine.IO Client Library for .Net

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 96.8%
  • JavaScript 3.2%