Nethermind.Libp2p.Protocols.Mplex 1.1.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package Nethermind.Libp2p.Protocols.Mplex --version 1.1.4
                    
NuGet\Install-Package Nethermind.Libp2p.Protocols.Mplex -Version 1.1.4
                    
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="Nethermind.Libp2p.Protocols.Mplex" Version="1.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nethermind.Libp2p.Protocols.Mplex" Version="1.1.4" />
                    
Directory.Packages.props
<PackageReference Include="Nethermind.Libp2p.Protocols.Mplex" />
                    
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 Nethermind.Libp2p.Protocols.Mplex --version 1.1.4
                    
#r "nuget: Nethermind.Libp2p.Protocols.Mplex, 1.1.4"
                    
#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 Nethermind.Libp2p.Protocols.Mplex@1.1.4
                    
#: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=Nethermind.Libp2p.Protocols.Mplex&version=1.1.4
                    
Install as a Cake Addin
#tool nuget:?package=Nethermind.Libp2p.Protocols.Mplex&version=1.1.4
                    
Install as a Cake Tool

Mplex

Nethermind.Libp2p.Protocols.Mplex implements /mplex/6.7.0 for compatibility with peers that require the legacy TCP multiplexer. The standard stack continues to use Yamux. Mplex has no stream flow control; prefer Yamux when both peers support it, or QUIC's native streams.

Reference this package alongside Nethermind.Libp2p, then override the standard builder's multiplexer list:

using Nethermind.Libp2p;
using Nethermind.Libp2p.Core;
using Nethermind.Libp2p.Protocols;

public class CompatibilityBuilder(IServiceProvider provider) : Libp2pPeerFactoryBuilder(provider)
{
    protected override ProtocolRef[] Muxers() => [Get<YamuxProtocol>(), Get<MplexProtocol>()];
}

Register CompatibilityBuilder as your IPeerFactoryBuilder. The order prefers Yamux while accepting Mplex-only peers. To require Mplex, return only Get<MplexProtocol>(). It applies to stream transports; QUIC still uses its own streams.

Each endpoint can independently initiate stream ID zero. Stream close ends only the sender's write direction; queued bytes arrive before EOF and the receiver can still reply. Reset aborts both directions. Unknown frames for retired streams are consumed without recreating them, and names are ignored.

The connection accepts payloads up to the protocol's 1 MiB limit and sends data in frames of at most 16 KiB (smaller when needed to fit the secure transport's preferred write size). Local resource limits are 512 inbound and 512 outbound stream reservations per connection (1,024 combined), 64 queued incoming frames per stream, 4 MiB of unread bytes per stream, 16 MiB across the connection, and 64 queued ordinary outgoing frames. Unread byte limits include a delivery blocked on the application. Streams exceeding an incoming buffer limit are reset without blocking delivery to other streams. New remote streams beyond the inbound reservation limit are reset; local requests beyond the outbound limit fail. Streams in one direction do not consume admission capacity in the other.

Resets use a separate FIFO and ordinary-queue saturation never tears down the connection. Each accepted stream retains its reservation until local cleanup and any required reset transmission both finish, with at most one pending reset per reservation, still charged to its original direction. Retired entries awaiting transmission discard late frames. Rejected remote opens have a separate budget of 64 queued or in-flight resets, bounding all accepted and rejected reset obligations to 1,088 per connection. If that budget is exhausted, the reader pauses until a reset finishes; this bounds memory but can delay unrelated inbound traffic while the peer is not reading. The first such pause logs a warning per connection.

The single transport writer finishes the current frame, then gives resets priority in bursts of at most eight before serving an eligible ordinary frame. Each queue preserves FIFO order, and cancelled ordinary frames are skipped. Opening frames, data, and graceful closes retain their existing order. Transport progress is required to drain either queue.

Malformed or non-minimal varint encodings, reserved flags, duplicate live stream IDs, oversized frames, and nonempty close/reset payloads close the connection. Messages after a stream's receive half closes reset that stream. There is no wire-level flow-control extension or new handshake.

Wire behavior follows the Mplex specification and unsigned varint specification. Mplex is deprecated for general libp2p use, but the Ethereum consensus networking specification requires it for TCP compatibility and prefers Yamux when available.

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

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.1 97 11/22/2026
1.2.0 58,418 11/16/2026
1.1.4 90 11/15/2026
1.1.3 93 11/15/2026
1.1.2 92 11/15/2026
1.1.1 820 11/2/2026