SocketJack 2026.0.0
dotnet add package SocketJack --version 2026.0.0
NuGet\Install-Package SocketJack -Version 2026.0.0
<PackageReference Include="SocketJack" Version="2026.0.0" />
<PackageVersion Include="SocketJack" Version="2026.0.0" />
<PackageReference Include="SocketJack" />
paket add SocketJack --version 2026.0.0
#r "nuget: SocketJack, 2026.0.0"
#:package SocketJack@2026.0.0
#addin nuget:?package=SocketJack&version=2026.0.0
#tool nuget:?package=SocketJack&version=2026.0.0
SocketJack
![]()
SocketJack is a batteries-included .NET networking stack for typed object transport, HTTP/WebSocket apps, mutable protocol hosting, streaming, peer routing, and WPF control sharing.
It handles framing, segmentation, serialization, compression, routing, protocol detection, TLS, static file hosting, stream routes, and callback dispatch so application code can focus on intent instead of wire plumbing.
Packages
| Package | Version | Targets | Role |
|---|---|---|---|
SocketJack |
2026 |
.NET Standard 2.1 |
Core TCP, UDP, HTTP, WebSocket, protocol multiplexing, data, file transfer, and streaming utilities. |
SocketJack.WPF |
2026 |
net8.0-windows7.0, net10.0-windows7.0 |
WPF live capture, remote input, and GUI remoting on top of SocketJack. |
Companion runtime projects are documented separately, including LlmRuntime/README.md.
Feature Map
| Category | Highlights |
|---|---|
| Transport core | Unified TcpClient, TcpServer, UdpClient, UdpServer, HTTP, and WebSocket APIs with typed callbacks and consistent lifecycle events. |
| Protocol multiplexing | MutableTcpServer auto-detects HTTP, SocketJack, WebSocket, RTMP, TDS/SQL, FTP configuration, and custom protocols on one port. |
| Object messaging | Send serializable objects directly, register typed callbacks, broadcast to peers, and route messages by Identifier metadata. |
| HTTP app hosting | Route mapping, typed request bodies, static files, directory hosting, upload streams, chunked stream routes, redirects, caching headers, and .htaccess controls. |
| Browser WebSockets | RFC 6455 WebSocket client/server support that shares SocketJack serialization, compression, callbacks, and peer flows. |
| Peer-to-peer | Peer discovery, relay-assisted routing, metadata, host/client roles, broadcasts, and direct peer sends. |
| Compression and throughput | GZip/Deflate compression, configurable buffers, async I/O, automatic segmentation, outbound chunking, and bandwidth throttling. |
| Security | TLS through SslStream, X.509 auth, HTTP Basic auth, bearer tokens, host-local checks, and allow/deny rules. |
| Embedded data | JSON-backed data server, SQL admin panel, TDS protocol handler, cache optimization, snapshots, and generated context helpers. |
| File transfer | FTP/SFTP helpers, uploads/downloads, directory hashing, remote clone tracking, and filesystem allowlists. |
| Streaming media | BroadcastServer accepts RTMP or HTTP ingest and relays FLV data to browser or VLC viewers. |
| WPF remoting | Share any WPF FrameworkElement as a live JPEG stream and route remote mouse, wheel, text, and keyboard input back to WPF. |
Quick Start
Install the core networking package:
dotnet add package SocketJack
Or with Package Manager:
Install-Package SocketJack
Install WPF remoting when you need live WPF capture/input:
dotnet add package SocketJack.WPF
TCP
using SocketJack.Net;
var server = new TcpServer(port: 12345);
server.Listen();
server.RegisterCallback<ChatMessage>(args =>
{
Console.WriteLine(args.Object.Text);
args.Connection.Send(new ChatMessage("received"));
});
var client = new TcpClient();
await client.Connect("127.0.0.1", 12345);
client.Send(new ChatMessage("hello"));
public sealed record ChatMessage(string Text);
HTTP
using SocketJack.Net;
var server = new HttpServer(port: 8080);
server.Map("GET", "/health", (connection, request, ct) =>
{
return new { status = "ok" };
});
server.MapDirectory("/static", @"C:\wwwroot");
server.Listen();
WebSocket
using SocketJack.Net;
var server = new WebSocketServer(port: 9000);
server.Listen();
server.RegisterCallback<ChatMessage>(args =>
{
server.SendBroadcast(new ChatMessage(args.Object.Text));
});
var client = new WebSocketClient();
await client.Connect("127.0.0.1", 9000);
client.Send(new ChatMessage("hello from websocket"));
MutableTcpServer
MutableTcpServer lets HTTP, SocketJack, WebSocket, RTMP, and custom protocols share one listening port.
using SocketJack.Net;
var server = new MutableTcpServer(port: 9000);
server.Http.Map("GET", "/status", (connection, request, ct) => "ok");
server.WebSocketClientConnected += connection => Console.WriteLine($"WebSocket: {connection.ID}");
server.SocketJackClientConnected += connection => Console.WriteLine($"SocketJack: {connection.ID}");
server.Listen();
WPF Remoting
Install SocketJack.WPF, then share any WPF element over a SocketJack connection.
using SocketJack.WPF;
IDisposable shareHandle = GameCanvas.Share(client, remotePeer, fps: 10);
Documentation
License
SocketJack is open source and licensed under the MIT License.
<details> <summary><strong>LineCounter - Output</strong> <code>11,362,228 lines / 304 files</code></summary>
<br>
<strong>Scope:</strong> <code>SocketJack</code><br> <strong>Source:</strong> <code>GetLineCount.bat</code> rules, non-empty/non-whitespace lines only; build/vendor folders skipped.
| Language | Files | Lines |
|---|---|---|
| Text | 123 | 11,232,431 |
| HTML | 11 | 74,994 |
| C# | 121 | 44,652 |
| XML | 3 | 5,193 |
| Markdown | 24 | 2,479 |
| JSON | 16 | 998 |
| MSBuild/XML | 3 | 713 |
| Batch | 1 | 370 |
| PowerShell | 1 | 255 |
| EditorConfig | 1 | 143 |
| Total | 304 | 11,362,228 |
</details>
| Product | Versions 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. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Mono.Nat (>= 3.0.4)
- SSH.NET (>= 2025.1.0)
- System.Collections.Concurrent (>= 4.3.0)
- System.Text.Json (>= 10.0.7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SocketJack:
| Package | Downloads |
|---|---|
|
ProjectZ
An XNA UI Framework that runs on modern .NET 8.0 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 2026.0.0 | 91 | 5/30/2026 | |
| 2.0.0 | 116 | 5/6/2026 | |
| 1.7.2 | 93 | 5/5/2026 | |
| 1.6.7 | 144 | 3/9/2026 | |
| 1.6.0 | 108 | 3/7/2026 | |
| 1.5.0 | 113 | 3/2/2026 | |
| 1.4.5 | 126 | 2/23/2026 | |
| 1.4.4 | 127 | 2/23/2026 | |
| 1.4.2 | 131 | 2/21/2026 | |
| 1.4.1 | 130 | 2/21/2026 | |
| 1.4.0 | 130 | 2/21/2026 | |
| 1.3.0 | 149 | 2/7/2026 | |
| 1.2.3 | 160 | 1/19/2026 | |
| 1.2.2 | 492 | 12/8/2025 |