SocketIOClient 1.0.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package SocketIOClient --version 1.0.2.1                
NuGet\Install-Package SocketIOClient -Version 1.0.2.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SocketIOClient" Version="1.0.2.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SocketIOClient --version 1.0.2.1                
#r "nuget: SocketIOClient, 1.0.2.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SocketIOClient as a Cake Addin
#addin nuget:?package=SocketIOClient&version=1.0.2.1

// Install SocketIOClient as a Cake Tool
#tool nuget:?package=SocketIOClient&version=1.0.2.1                

Socket.IO-client C#

This is the Socket.IO client for C#, which is base on ClientWebSocket, provide a simple way to connect to the Socket.IO server. The target framework is .NET Standard 2.0

Usage

var client = new SocketIO("http://localhost:3000")
{
    // if server need some parameters, you can add to here
    Parameters = new Dictionary<string, string>
    {
        { "uid", "" },
        { "token", "" }
    }
}

client.OnClosed += Client_OnClosed;
client.OnConnected += Client_OnConnected;

// Listen server events
client.On("test", res =>
{
    Console.WriteLine(res.Text);
    // Next, you might parse the data in this way.
    var obj = JsonConvert.DeserializeObject<T>(res.Text);
    // Or, read some fields
    var jobj = JObject.Parse(res.Text);
    int code = jobj.Value<int>("code");
    bool hasMore = jobj["data"].Value<bool>("hasMore");
    var data = jobj["data"].ToObject<ResponseData>();
    // ...
});

// Connect to the server
await client.ConnectAsync();

// Emit test event, send string.
await client.EmitAsync("test", "EmitTest");

// Emit test event, send object.
await client.EmitAsync("test", new { code = 200 });

// ...

private void Client_OnConnected()
{
    Console.WriteLine("Connected to server");
}

private async void Client_OnClosed()
{
    if (reason == ServerCloseReason.ClosedByServer)
    {
        // ...
    }
    else if (reason == ServerCloseReason.Aborted)
    {
        for (int i = 0; i < 3; i++)
        {
            try
            {
                await client.ConnectAsync();
                break;
            }
            catch (WebSocketException ex)
            {
                // show tips
                Console.WriteLine(ex.Message);
                await Task.Delay(2000);
            }
        }
        // show tips
        Console.WriteLine("Tried to reconnect 3 times, unable to connect to the server");
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (36)

Showing the top 5 NuGet packages that depend on SocketIOClient:

Package Downloads
ElectronNET.API

Building cross platform electron based desktop apps with .NET Core and ASP.NET Core. This package contains the API to access the "native" electron API.

DigitalRuby.ExchangeSharp

ExchangeSharp is a C# API for working with various cryptocurrency exchanges. Web sockets are also supported for some exchanges.

SocketIOClient.Newtonsoft.Json

socket.io-client json serialization/deserialization for Newtonsoft.Json

Backendless.NET

Backendless is a cloud-based serverless platform which significantly simplifies the process of development of web and mobile applications. This SDK provides the client-side APIs which you can use in your app to take advantage of the Backendless platform functionality. Your application can rely on Backendless for the following functions: Backendless has a ton of awesome functionality including: - Real-time Database - Real-time Publish/Subscribe Messaging - User Management (user registration, login, logout, password recovery) - Push Notification - File operations (upload, download, copy, move, delete) - Geo location All the APIs can be secured with roles-based security. Also, you can create your own API services and deploy them into Backendless.

SecTester.Repeater

This SDK is designed to provide all the basic tools and functions that will allow you to easily integrate the Bright security testing engine into your own project.

GitHub repositories (7)

Showing the top 5 popular GitHub repositories that depend on SocketIOClient:

Repository Stars
ElectronNET/Electron.NET
:electron: Build cross platform desktop apps with ASP.NET Core (Razor Pages, MVC, Blazor).
ArduPilot/MissionPlanner
Mission Planner Ground Control Station for ArduPilot (c# .net)
silahian/VisualHFT
VisualHFT is a cutting-edge GUI platform for market analysis, focusing on real-time visualization of market microstructure. Built with WPF & C#, it displays key metrics like Limit Order Book dynamics and execution quality. Its modular design ensures adaptability for developers and traders, enabling tailored analytical solutions.
DigitalRuby/ExchangeSharp
ExchangeSharp is a powerful, fast and easy to use .NET/C# API for interfacing with many crypto currency exchanges. REST and web sockets are supported.
automuteus/amonguscapture
Capture of the local Among Us executable state
Version Downloads Last updated
3.1.2 14,073 8/18/2024
3.1.1 107,861 9/5/2023
3.1.0 791 8/27/2023
3.0.8 234,019 3/4/2023
3.0.7 32,126 11/29/2022
3.0.7-alpha.3 112 11/29/2022
3.0.7-alpha.2 125 11/29/2022
3.0.7-alpha.1 221 11/6/2022
3.0.6 193,255 3/17/2022
3.0.5 44,475 1/12/2022
3.0.4 26,139 12/6/2021
3.0.4-alpha.1 224 11/18/2021
3.0.3 17,022 9/24/2021
3.0.2 1,208 9/22/2021
3.0.1 529 9/18/2021
3.0.0 2,593 9/13/2021
2.3.1 36,954 8/3/2021
2.3.0 3,407 7/22/2021
2.2.4 34,171 6/24/2021
2.2.3 2,501 6/15/2021
2.2.2 1,488 6/7/2021
2.2.1 1,554 6/5/2021
2.2.1-alpha.1 214 6/4/2021
2.2.0 14,880 4/29/2021
2.1.8-alpha-0 301 4/1/2021
2.1.7 18,870 3/24/2021
2.1.6 3,655 3/11/2021
2.1.5 20,845 2/5/2021
2.1.4 469 2/5/2021 2.1.4 is deprecated because it has critical bugs.
2.1.3 16,680 1/13/2021
2.1.2 1,427 12/23/2020
2.1.1 8,752 11/13/2020
2.1.0 1,265 11/12/2020
2.1.0-alpha.1 319 11/10/2020
2.0.2.9 3,858 10/27/2020
2.0.2.8 787 10/25/2020 2.0.2.8 is deprecated because it has critical bugs.
2.0.2.7 11,136 10/9/2020
2.0.2.6 195,885 9/9/2020
2.0.2.5 1,079 9/8/2020
2.0.2.4 13,182 8/14/2020
2.0.2.3 2,133 7/22/2020
2.0.2.2 1,095 7/11/2020
2.0.2.1 58,027 6/18/2020
2.0.2.1-alpha.2 388 6/16/2020 2.0.2.1-alpha.2 is deprecated because it is no longer maintained.
2.0.2.1-alpha.1 367 6/15/2020 2.0.2.1-alpha.1 is deprecated because it is no longer maintained.
2.0.2 3,644 6/15/2020
2.0.2-alpha.2 371 6/10/2020 2.0.2-alpha.2 is deprecated because it is no longer maintained.
2.0.2-alpha.1 372 6/10/2020 2.0.2-alpha.1 is deprecated because it is no longer maintained.
2.0.1 2,898 6/2/2020
2.0.1-alpha.5 392 6/1/2020 2.0.1-alpha.5 is deprecated because it is no longer maintained.
2.0.1-alpha.4 463 5/30/2020 2.0.1-alpha.4 is deprecated because it is no longer maintained.
2.0.1-alpha.3 376 5/30/2020 2.0.1-alpha.3 is deprecated because it is no longer maintained.
2.0.1-alpha.2 2,421 5/29/2020 2.0.1-alpha.2 is deprecated because it is no longer maintained.
2.0.1-alpha.1 417 5/29/2020 2.0.1-alpha.1 is deprecated because it is no longer maintained.
2.0.0 31,788 5/21/2020
2.0.0-beta.3 395 5/21/2020 2.0.0-beta.3 is deprecated because it is no longer maintained.
2.0.0-beta.2 395 5/21/2020 2.0.0-beta.2 is deprecated because it is no longer maintained.
2.0.0-beta.1 445 5/18/2020 2.0.0-beta.1 is deprecated because it is no longer maintained.
2.0.0-alpha-2 526 5/16/2020 2.0.0-alpha-2 is deprecated because it is no longer maintained.
2.0.0-alpha 457 5/15/2020 2.0.0-alpha is deprecated because it is no longer maintained.
1.0.3.13 3,249 5/8/2020 1.0.3.13 is deprecated because it is no longer maintained.
1.0.3.13-alpha 528 5/7/2020 1.0.3.13-alpha is deprecated because it is no longer maintained.
1.0.3.12 5,523 4/10/2020 1.0.3.12 is deprecated because it is no longer maintained.
1.0.3.11 738 4/9/2020 1.0.3.11 is deprecated because it is no longer maintained.
1.0.3.10 726 4/8/2020 1.0.3.10 is deprecated because it is no longer maintained.
1.0.3.9 967 4/7/2020 1.0.3.9 is deprecated because it is no longer maintained.
1.0.3.8 4,025 3/17/2020 1.0.3.8 is deprecated because it is no longer maintained.
1.0.3.7 743 3/17/2020 1.0.3.7 is deprecated because it is no longer maintained.
1.0.3.6 745 3/16/2020 1.0.3.6 is deprecated because it is no longer maintained.
1.0.3.5 712 3/16/2020 1.0.3.5 is deprecated because it is no longer maintained.
1.0.3.4 678 3/16/2020 1.0.3.4 is deprecated because it is no longer maintained.
1.0.3.3 1,264 3/8/2020 1.0.3.3 is deprecated because it is no longer maintained.
1.0.3.2 692 3/7/2020 1.0.3.2 is deprecated because it is no longer maintained.
1.0.3.1 714 3/7/2020 1.0.3.1 is deprecated because it is no longer maintained.
1.0.3 833 3/2/2020 1.0.3 is deprecated because it is no longer maintained.
1.0.2.7 1,151 2/13/2020 1.0.2.7 is deprecated because it is no longer maintained.
1.0.2.6 2,419 10/21/2019 1.0.2.6 is deprecated because it is no longer maintained.
1.0.2.5 945 9/14/2019 1.0.2.5 is deprecated because it is no longer maintained.
1.0.2.4 777 9/8/2019 1.0.2.4 is deprecated because it is no longer maintained.
1.0.2.3 792 8/27/2019 1.0.2.3 is deprecated because it is no longer maintained.
1.0.2.2 739 8/26/2019 1.0.2.2 is deprecated because it is no longer maintained.
1.0.2.1 762 8/21/2019 1.0.2.1 is deprecated because it is no longer maintained.
1.0.2 777 8/21/2019 1.0.2 is deprecated because it is no longer maintained.
1.0.1 821 8/7/2019 1.0.1 is deprecated because it is no longer maintained.
1.0.0 978 8/6/2019 1.0.0 is deprecated because it is no longer maintained.