SocketJack 2026.0.0

dotnet add package SocketJack --version 2026.0.0
                    
NuGet\Install-Package SocketJack -Version 2026.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="SocketJack" Version="2026.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SocketJack" Version="2026.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SocketJack" />
                    
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 SocketJack --version 2026.0.0
                    
#r "nuget: SocketJack, 2026.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 SocketJack@2026.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=SocketJack&version=2026.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SocketJack&version=2026.0.0
                    
Install as a Cake Tool

SocketJack

SocketJack Icon

NuGet NuGet Downloads License: MIT

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.