NetConduit.Udp
2.2.2
See the version list below for details.
dotnet add package NetConduit.Udp --version 2.2.2
NuGet\Install-Package NetConduit.Udp -Version 2.2.2
<PackageReference Include="NetConduit.Udp" Version="2.2.2" />
<PackageVersion Include="NetConduit.Udp" Version="2.2.2" />
<PackageReference Include="NetConduit.Udp" />
paket add NetConduit.Udp --version 2.2.2
#r "nuget: NetConduit.Udp, 2.2.2"
#:package NetConduit.Udp@2.2.2
#addin nuget:?package=NetConduit.Udp&version=2.2.2
#tool nuget:?package=NetConduit.Udp&version=2.2.2
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.Tcp
using NetConduit;
using NetConduit.Tcp;
using NetConduit.Transits;
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 + transits |
NetConduit.Tcp |
TCP transport |
NetConduit.WebSocket |
WebSocket transport |
NetConduit.Udp |
UDP with reliability layer |
NetConduit.Ipc |
IPC (loopback/Unix sockets) |
NetConduit.Quic |
QUIC transport |
Architecture
┌────────────────────────────────────────────────────────────────┐
│ Application │
├────────────────────────────────────────────────────────────────┤
│ Transits: MessageTransit, DeltaTransit, DuplexStream, Stream │
├────────────────────────────────────────────────────────────────┤
│ Core: Framing, Channels, Backpressure, Priority, Reconnect │
├────────────────────────────────────────────────────────────────┤
│ Transports: 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/NetConduit.Samples.GroupChat -- server tcp 5000
dotnet run --project samples/NetConduit.Samples.GroupChat -- client tcp 5000 127.0.0.1 Alice
Documentation
Full documentation at docs/:
- Getting Started
- Transports — TCP, WebSocket, UDP, IPC, QUIC
- Transits — MessageTransit, DeltaTransit, 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
- NetConduit (>= 2.2.3)
-
net8.0
- NetConduit (>= 2.2.3)
-
net9.0
- NetConduit (>= 2.2.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
## New Apps
* Bump `net_conduit_tcp` from `2.2.0` to `2.2.2`. See [changelog](https://github.com/Kiryuumaru/NetConduit/compare/net_conduit_tcp/2.2.0...net_conduit_tcp/2.2.2)
* Bump `net_conduit_websocket` from `2.2.0` to `2.2.2`. See [changelog](https://github.com/Kiryuumaru/NetConduit/compare/net_conduit_websocket/2.2.0...net_conduit_websocket/2.2.2)
* Bump `net_conduit_udp` from `2.2.0` to `2.2.2`. See [changelog](https://github.com/Kiryuumaru/NetConduit/compare/net_conduit_udp/2.2.0...net_conduit_udp/2.2.2)
* Bump `net_conduit_ipc` from `2.2.0` to `2.2.2`. See [changelog](https://github.com/Kiryuumaru/NetConduit/compare/net_conduit_ipc/2.2.0...net_conduit_ipc/2.2.2)
* Bump `net_conduit_quic` from `2.2.0` to `2.2.2`. See [changelog](https://github.com/Kiryuumaru/NetConduit/compare/net_conduit_quic/2.2.0...net_conduit_quic/2.2.2)
**Full Changelog**: https://github.com/Kiryuumaru/NetConduit/compare/build.20260506022002.3ad034a...build.20260506033402.c60df9b