finds.dev

itisnajim/SocketIOUnity

A Wrapper for socket.io-client-csharp to work with Unity.

View on GitHub

★ 507C#MITupdated May 2025

// the take

A thin wrapper around socket.io-client-csharp that makes the library usable inside Unity, handling the main-thread marshaling Unity requires and exposing socket.io v2/v3/v4 over both WebSocket and HTTP polling. Aimed at Unity devs who need realtime server push (multiplayer sync, live data, chat) without rolling their own socket.io client.

The OnUnityThread/UnityThread.executeInUpdate helpers solve a real, specific problem: socket.io callbacks fire on background threads, and touching Transform or PlayerPrefs from there crashes or silently fails in Unity. Swappable JSON serializer (System.Text.Json by default, Newtonsoft as a drop-in) directly addresses a known IL2CPP incompatibility rather than ignoring it. Protocol version coverage (socket.io v2/v3/v4, both transports) means it isn't locked to one server version.

Platform support is explicitly PC/Mac, iOS, Android only - no console platforms, and the README admits the Editor itself isn't reliably tested, which is a bad sign for day-to-day dev iteration. No documented reconnection/backoff behavior for dropped connections, which is the normal failure mode on mobile networks and exactly where a socket wrapper needs to earn its keep. Precompiled BCL polyfill DLLs (System.Text.Json, System.Buffers, System.Memory, etc.) are bundled directly in Runtime/libs instead of resolved as package dependencies, which is a common source of duplicate-assembly conflicts when another Unity package bundles the same DLLs at a different version. Last push May 2025 with no CHANGELOG or releases process visible, so it's hard to tell if a given fix landed or is still open.

We read the README, the directory tree and a key source file in November 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
507
Forks
88
Language
C#
License
MIT
Last commit
13 May 2025

// nearby

If SocketIOUnity isn't quite it.

All repos →