WASSocket 1.0.0

dotnet add package WASSocket --version 1.0.0
                    
NuGet\Install-Package WASSocket -Version 1.0.0
                    
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="WASSocket" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WASSocket" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="WASSocket" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WASSocket --version 1.0.0
                    
#r "nuget: WASSocket, 1.0.0"
                    
#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.
#:package WASSocket@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WASSocket&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=WASSocket&version=1.0.0
                    
Install as a Cake Tool

๐Ÿš€ WASSocket C# Client SDK

High performance WebSocket client for WASSocket Server.
Designed for realtime apps, games, tools, and backend services.


โœจ Features

  • โœ… WebSocket transport
  • โœ… Event-based API (emit / on)
  • โœ… Binary protocol ready
  • โœ… Room support (join / leave)
  • โœ… Auto Ping / Pong
  • โœ… ACK support (request / response)
  • โœ… Async / Await friendly
  • โœ… Cross-platform (.NET 6+)
  • โœ… Unity compatible
  • โœ… Single-file SDK

๐Ÿ“ฆ Installation

Using NuGet:

dotnet add package WASSocket

Or via Visual Studio NuGet Manager.

๐Ÿš€ Quick Start

using WASSocket;

class Program
{
    static async Task Main()
    {
        var socket = new WASSocketClient("ws://localhost:3000");

        socket.On("chat", msg =>
        {
            Console.WriteLine("Message: " + msg);
        });

        await socket.ConnectAsync();
        await socket.JoinAsync("room1");
        await socket.EmitAsync("chat", "Hello from C#");

        Console.ReadLine();
    }
}

๐Ÿ“ก API Reference ๐Ÿ”— Connect

await socket.ConnectAsync();

โŒ Disconnect

await socket.DisconnectAsync();

๐Ÿ“ค Emit Event

await socket.EmitAsync("eventName", data);

With ACK:

var response = await socket.EmitAsync("login", payload, waitAck: true);

๐Ÿ“ฅ Listen Event

socket.On("chat", data =>
{
    Console.WriteLine(data);
});

๐Ÿ  Join Room

await socket.JoinAsync("room1");

๐Ÿšช Leave Room

await socket.LeaveAsync("room1");

โš™๏ธ Requirements

.NET 6.0 or newer

WebSocket supported operating system

๐Ÿ” Security

Supports secure WebSocket (WSS) and token authentication.

Example:

var socket = new WASSocketClient("wss://yourserver.com?token=YOUR_TOKEN");

##๐Ÿงช Debug Tips

Enable console logs to monitor connection status and packets.

๐Ÿ—บ๏ธ Roadmap

๐Ÿ”„ Auto reconnect improvements

๐Ÿ“ฆ Offline message queue

โšก Binary encoder optimization

๐Ÿ” Built-in encryption

๐Ÿ“Š Metrics monitoring

๐ŸŽฎ Unity package support

๐Ÿค Contributing

Pull requests are welcome. Feel free to open issues and feature requests.

๐Ÿ“œ License

MIT License

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 125 1/23/2026