NetConduit 3.0.1
dotnet add package NetConduit --version 3.0.1
NuGet\Install-Package NetConduit -Version 3.0.1
<PackageReference Include="NetConduit" Version="3.0.1" />
<PackageVersion Include="NetConduit" Version="3.0.1" />
<PackageReference Include="NetConduit" />
paket add NetConduit --version 3.0.1
#r "nuget: NetConduit, 3.0.1"
#:package NetConduit@3.0.1
#addin nuget:?package=NetConduit&version=3.0.1
#tool nuget:?package=NetConduit&version=3.0.1
NetConduit
Transport-agnostic stream multiplexer for .NET — Multiple virtual channels over a single bidirectional stream.
N streams → 1 stream (mux) → N streams (demux)
Features
- Multiple channels — Many logical streams over one connection
- Credit-based backpressure — Flow control prevents overwhelming receivers
- Priority queuing — Higher priority frames sent first
- Auto-reconnection — Channel state restored after disconnect
- Native AOT — No reflection in core library
- Zero dependencies — Only BCL types
- Modern .NET — Targets .NET 8, 9, and 10
Quick Start
dotnet add package NetConduit
dotnet add package NetConduit.Transport.Tcp
dotnet add package NetConduit.Transit.Message
using NetConduit;
using NetConduit.Transport.Tcp;
using NetConduit.Transit.Message;
using System.Text.Json.Serialization;
public record ChatMessage(string User, string Text);
[JsonSerializable(typeof(ChatMessage))]
public partial class ChatContext : JsonSerializerContext { }
// Server
var listener = new TcpListener(IPAddress.Any, 5000);
listener.Start();
await using var server = StreamMultiplexer.Create(TcpMultiplexer.CreateServerOptions(listener));
server.Start();
await server.WaitForReadyAsync();
await using var transit = await server.AcceptMessageTransitAsync("chat", ChatContext.Default.ChatMessage);
await foreach (var msg in transit.ReceiveAllAsync())
Console.WriteLine($"[{msg.User}] {msg.Text}");
// Client
await using var client = StreamMultiplexer.Create(TcpMultiplexer.CreateOptions("localhost", 5000));
client.Start();
await client.WaitForReadyAsync();
await using var transit = await client.OpenMessageTransitAsync("chat", ChatContext.Default.ChatMessage);
await transit.SendAsync(new ChatMessage("Alice", "Hello!"));
Packages
| Package | Description |
|---|---|
NetConduit |
Core multiplexer + base interfaces |
NetConduit.Transit.Stream |
Single-channel Stream wrapper |
NetConduit.Transit.DuplexStream |
Bidirectional Stream over two channels |
NetConduit.Transit.Message |
Typed JSON message framing |
NetConduit.Transit.DeltaMessage |
State-sync via JSON delta diffs |
NetConduit.Transport.Tcp |
TCP transport |
NetConduit.Transport.WebSocket |
WebSocket transport |
NetConduit.Transport.Udp |
UDP with reliability layer |
NetConduit.Transport.Ipc |
IPC (loopback/Unix sockets) |
NetConduit.Transport.Quic |
QUIC transport |
Architecture
┌──────────────────────────────────────────────────────────────────────────────┐
│ Application │
├──────────────────────────────────────────────────────────────────────────────┤
│ Transit Layer (Optional) │
│ ┌──────────────┐ ┌──────────────┐ ┌───────────────────┐ ┌─────────────┐ │
│ │MessageTransit│ │ DeltaMessageTransit │ │DuplexStreamTransit│ │StreamTransit│ │
│ └──────────────┘ └──────────────┘ └───────────────────┘ └─────────────┘ │
├──────────────────────────────────────────────────────────────────────────────┤
│ NetConduit Core │
│ - Frame encoding/decoding │
│ - Channel management │
│ - Credit-based backpressure │
│ - Priority queuing │
│ - Auto-reconnection │
├──────────────────────────────────────────────────────────────────────────────┤
│ Transport Layer (Pluggable) │
│ ┌─────┐ ┌─────────┐ ┌─────┐ ┌─────┐ ┌──────┐ │
│ │ TCP │ │WebSocket│ │ UDP │ │ IPC │ │ QUIC │ │
│ └─────┘ └─────────┘ └─────┘ └─────┘ └──────┘ │
└──────────────────────────────────────────────────────────────────────────────┘
Samples
| Sample | Description |
|---|---|
| GroupChat | Multi-user chat (TCP + WebSocket) |
| FileTransfer | Parallel file transfers with progress |
| Pong | Multiplayer game with delta state sync |
| RemoteShell | SSH-like remote command execution |
| RpcFramework | Type-safe JSON-RPC pattern |
| TcpTunnel | Port forwarding like ngrok |
| Scoreboard | Live leaderboard with reconnection |
dotnet run --project samples/GroupChatSample -- server tcp 5000
dotnet run --project samples/GroupChatSample -- client tcp 5000 127.0.0.1 Alice
Documentation
Full documentation at docs/:
- Getting Started
- Transports — TCP, WebSocket, UDP, IPC, QUIC
- Transits — MessageTransit, DeltaMessageTransit, DuplexStream, Stream
- Concepts — Channels, backpressure, priority, reconnection
- API Reference
Building
dotnet build
dotnet test
License
See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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 is compatible. 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. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on NetConduit:
| Package | Downloads |
|---|---|
|
NetConduit.WebSocket
WebSocket transport helper for NetConduit stream multiplexer. Provides easy WebSocket client/server connection handling with automatic multiplexer setup. |
|
|
NetConduit.Tcp
TCP transport helper for NetConduit stream multiplexer. Provides easy TCP client/server connection handling with automatic multiplexer setup. |
|
|
NetConduit.Ipc
Local IPC transport helper for NetConduit (named pipes on Windows, Unix domain sockets elsewhere). |
|
|
NetConduit.Quic
QUIC transport helper for NetConduit stream multiplexer (System.Net.Quic). |
|
|
NetConduit.Udp
UDP transport helper for NetConduit stream multiplexer with a minimal reliable stream shim. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.1 | 0 | 5/14/2026 |
| 2.3.3 | 273 | 5/8/2026 |
| 2.3.2 | 115 | 5/7/2026 |
| 2.3.1 | 23 | 5/6/2026 |
| 2.2.3 | 152 | 5/6/2026 |
| 2.2.1 | 89 | 5/5/2026 |
| 2.1.4 | 44 | 4/27/2026 |
| 2.1.3 | 36 | 4/25/2026 |
| 2.1.2 | 42 | 4/22/2026 |
| 2.1.1 | 555 | 4/22/2026 |
| 2.1.0 | 32 | 4/22/2026 |
| 2.0.3 | 35 | 4/15/2026 |
| 2.0.2 | 446 | 4/14/2026 |
| 2.0.0 | 901 | 3/11/2026 |
| 1.2.6 | 22,416 | 12/6/2025 |
| 1.2.4 | 203 | 12/6/2025 |
| 1.2.3 | 172 | 12/5/2025 |
| 1.2.2 | 126 | 12/5/2025 |
| 1.2.1 | 124 | 12/5/2025 |
| 1.1.3 | 306 | 12/5/2025 |
## New Version
* Bump `net_conduit` from `2.3.2` to `3.0.1`. See [changelog](https://github.com/Kiryuumaru/NetConduit/compare/net_conduit/2.3.2...net_conduit/3.0.1)
## What's Changed
* refactor: Namespace restructuring and unhappy path tests by @Kiryuumaru in https://github.com/Kiryuumaru/NetConduit/pull/77
* test: add nested mux tests (mux-over-channel) by @Kiryuumaru in https://github.com/Kiryuumaru/NetConduit/pull/76
* fix: memory leak in channel lifecycle via IChannelOwner interface by @Kiryuumaru in https://github.com/Kiryuumaru/NetConduit/pull/78
* fix: replace blocking ManualResetEventSlim with async SemaphoreSlim in writer loop by @Kiryuumaru in https://github.com/Kiryuumaru/NetConduit/pull/79
* perf: restore writer loop perf - revert PR #79 async wait, use LongRunning sync writer by @Kiryuumaru in https://github.com/Kiryuumaru/NetConduit/pull/82
* Bump NukeBuildHelpers and System.Security.Cryptography.Xml by @dependabot[bot] in https://github.com/Kiryuumaru/NetConduit/pull/84
* Bump NuGet.Packaging from 7.3.1 to 7.6.0 by @dependabot[bot] in https://github.com/Kiryuumaru/NetConduit/pull/80
* refactor: modular rename to Core / Transit.* / Transport.* by @Kiryuumaru in https://github.com/Kiryuumaru/NetConduit/pull/83
* chore: archive pre-modular-rename state as old/v3 by @Kiryuumaru in https://github.com/Kiryuumaru/NetConduit/pull/85
**Full Changelog**: https://github.com/Kiryuumaru/NetConduit/compare/build.20260507135430.4298a59...build.20260514113647.b04936d