https://github.com/quobject/engineioclientdotnet
Engine.IO Client Library for .Net
https://github.com/quobject/engineioclientdotnet
Last synced: 9 months ago
JSON representation
Engine.IO Client Library for .Net
- Host: GitHub
- URL: https://github.com/quobject/engineioclientdotnet
- Owner: Quobject
- License: mit
- Created: 2014-08-09T21:47:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-02-25T05:55:02.000Z (about 3 years ago)
- Last Synced: 2024-04-14T23:58:34.708Z (almost 2 years ago)
- Language: C#
- Size: 1.86 MB
- Stars: 82
- Watchers: 9
- Forks: 76
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# EngineIoClientDotNet
Engine.IO Client Library for .Net
Fork from [https://github.com/joewen/EngineIoClientDotNet](https://github.com/joewen/EngineIoClientDotNet).
This is the Engine.IO Client Library for C#, which is ported from the [JavaScript client](https://github.com/Automattic/engine.io-client).
##### Installation
Nuget install:
```
Install-Package EngineIoClientDotNet.Standard
```
* NuGet Package: [](https://www.nuget.org/packages/EngineIoClientDotNet.Standard/)
##### Usage
EngineIoClientDotNet has a similar api to those of the [JavaScript client](https://github.com/Automattic/engine.io-client).
You can use `Socket` to connect:
```cs
var socket = new Socket("ws://localhost");
socket.On(Socket.EVENT_OPEN, () =>
{
socket.Send("hi", () =>
{
socket.Close();
});
});
socket.Open();
```
Receiving data
```cs
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.
#### Framework Versions
.Net Standard 2.0
## License
[MIT](http://opensource.org/licenses/MIT)