qmetrics.net

NativeWebSocket

Dependency-free WebSocket client for Unity and .NET

NativeWebSocket is a small WebSocket client for Unity, MonoGame, Godot, and general .NET projects. It uses built-in System.Net.WebSockets without extra native DLLs.

Overview

NativeWebSocket provides a WebSocket client for game engines and .NET applications that need real-time connectivity without shipping additional native dependencies. It wraps System.Net.WebSockets and targets netstandard2.0 and modern .NET so the same core runs across environments.

Unity installs via Unity Package Manager or a packaged asset; WebGL builds are supported with documented background-run settings. MonoGame projects can add a game component that wires SynchronizationContext so callbacks run on the game thread. Godot Mono routes events on the main thread through its built-in synchronization context.

The API exposes connect, send text or binary, close with codes, and events for open, message, error, and close. When no SynchronizationContext exists, callers can drain a message queue from their main loop. The library is used by projects such as the Colyseus Unity SDK.

Version 2 removed UnityEngine coupling from the core, added automatic main-thread dispatch, and requires UPM or unitypackage install because WebGL needs build-time source transforms.

Key features

  • No external WebSocket DLLs
  • Unity WebGL and native builds
  • MonoGame and Godot Mono support
  • Main-thread event dispatch
  • Text and binary send and receive
  • Simple connect and close API
  • netstandard2.0 and .NET 6 targets
  • UPM and unitypackage distribution

Use cases

  • Real-time multiplayer game clients
  • Unity WebGL browser WebSocket apps
  • Godot C# networked tools
  • MonoGame live data feeds
  • Generic .NET WebSocket clients

Tags

Similar software

Netty

Event-driven Java framework for protocol servers and clients

Netty is an asynchronous, event-driven network stack for building maintainable high-performance protocol servers and clients in Java.

★ 35.1k⟳ todayApache-2.0

Tokio

Rust runtime for reliable asynchronous network applications

Tokio is an event-driven, non-blocking I/O platform for asynchronous Rust programs. It supplies scheduling, timers, async TCP and UDP, and building blocks for network services.

★ 33.8k⟳ todayMIT
Frameworks & PlatformsDesktop/CLI app

libuv

Cross-platform asynchronous I/O support library

libuv is a multi-platform library centered on non-blocking I/O. Node.js and several other runtimes embed it for networking and event handling.

★ 27.4k⟳ 3 days agoMIT
Frameworks & PlatformsDesktop/CLI app

Ws

Node.js WebSocket client and server library

The ws package implements WebSocket client and server roles for Node.js. It is not for browser runtimes; front ends should use the native WebSocket API or an isomorphic wrapper.

★ 22.8k⟳ todayMIT
Frameworks & PlatformsDesktop/CLI app

WebRTC

Pure Go WebRTC stack for real-time media

Pion WebRTC implements the WebRTC API in Go without cgo, enabling peer connections, media, data channels, and ICE across servers, desktops, mobile, and WebAssembly targets.

★ 16.9k⟳ 3 days agoMIT
Frameworks & PlatformsDesktop/CLI app

Workflow

C++ async networking and parallel workflow engine

Sogou C++ Workflow is an enterprise-style C++ engine for HTTP servers, async clients, DAG workflows, and parallel compute used in Sogou’s online backends.

★ 14.4k⟳ 2 days agoApache-2.0