Agash.StreamTransport.Adaptation 0.2.0-dev5

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

Agash.StreamTransport.Adaptation

Transport-independent media adaptation for Agash.StreamTransport. The types here take what was sent and what feedback said about it, and produce a send rate, a pacing schedule and a loss-repair plan. They do not touch a socket, so a transport that owns its socket (the WebRTC package) composes them, and a transport that adapts by itself (QUIC, SRT) reports its own capacity instead. Every type runs on a caller-supplied clock reading, and none is thread-safe: the transport serializes calls.

ScreamCongestionController

ScreamCongestionController implements ICongestionController with SCReAMv2 (draft-ietf-ccwg-rfc8298bis-screamv2). A reference window bounds the bytes in flight and sets the target rate. The window is reduced at most once per virtual round trip on congestion and grows between congestion events. Loss backs off by a fixed factor once the average loss rate shows it is not link-layer noise, classic ECN by a smaller one, and L4S marks and queue delay in proportion to the congestion they show. Current gives the latest CapacityEstimate, Ecn the codepoint that suits its response, and ScreamOptions holds the tunables.

DeliveryTracker

DeliveryTracker resolves what became of each sent packet from feedback, the same way for every transport. A packet reported missing is lost only when it stays missing for the reordering window after a later packet arrived; a packet no feedback mentions is lost by the RACK time rule (RFC 8985). A packet is resolved once, however many overlapping reports cover it. The reordering window adapts to the delay that late packets showed, because delay variation on cellular and Wi-Fi links is not congestion.

Pacer

Pacer spreads outgoing packets over time at the congestion controller's pacing rate, so a keyframe does not leave as one burst. Packets carry a TrafficClass: audio goes first and is never held back, and retransmissions, video and FEC repair follow in that order and share one budget. A Gate callback applies the controller's send window. SentBytes counts what each class sent, from which MediaRateAllocator measures repair overhead. Sends run one at a time in queue order.

PathMtuDiscovery

PathMtuDiscovery is datagram packetization layer path MTU discovery (RFC 8899) for an acknowledged transport. It confirms the base size (1200 bytes by default), then runs a binary search up to a maximum (1452 bytes by default) with one probe in flight. Probes are judged by the transport's own loss detection, and black holes are detected from bursts of lost packets above the base size, which drop Current back to the base. PathMtuOptions holds the sizes and timers.

EcnValidator

EcnValidator validates ECN on a path before relying on it and keeps checking while using it (RFC 6679, RFC 9000 section 13.4.2). While testing, it marks a fraction of media packets. When feedback shows enough of them arriving with their mark (or CE), it marks all media. If marked packets arrive cleared or rewritten, or are lost while unmarked ones arrive, it stops marking and retries after an interval, or at once when the path changes. State reports where it stands.

CircuitBreaker

CircuitBreaker implements the RTP circuit breakers of RFC 8083, apart from congestion control. It trips on three silent reporting intervals, on reports that keep showing nothing arriving, or on a send rate far above what TCP would get. Congestion first holds media to a tenth of the rate that tripped it, and if that does not help within the next window, transmission ceases until TryReset succeeds. CircuitBreakerOptions holds the intervals, defaulting to RFC 8083's values.

RecoveryPolicy

RecoveryPolicy decides how a sender repairs loss from the path and the media, in the manner of libwebrtc's hybrid NACK/FEC. Retransmission alone is used on a short round trip. Otherwise FEC is added with a group size derived from the loss: the largest group whose chance of losing two or more packets, which one XOR repair cannot recover, stays under a target. Small frames get no FEC on a moderate round trip. Plan takes RecoveryInputs and returns a RecoveryPlan with the FEC group size and whether to retransmit.

MediaRateAllocator

MediaRateAllocator splits the rate a transport allows between audio, recovery traffic and video. Retransmission and repair bytes count against the same budget as the media (RFC 4588 section 7), so VideoBitsPerSecond returns what remains after audio and the measured recovery rate, never below a floor. It reads the bytes sent per TrafficClass, typically from the pacer.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net11.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Agash.StreamTransport.Adaptation:

Package Downloads
Agash.StreamTransport.WebRtc

A small, modern, libwebrtc-aligned WebRTC stack for .NET: ICE/STUN, SRTP, RTP/RTCP, SDP/JSEP and a peer connection. DTLS-SRTP over Dtls.Core; platform cryptography only. The first-party transport for Agash.StreamTransport.

Agash.StreamTransport.Abstractions

Transport-agnostic contracts for Agash.StreamTransport: the media transport a session runs over, the signaling channel, and rooms. Depends on the media model and the adaptation layer only.

Agash.StreamTransport

Peer-to-peer media sessions over WebRTC: sources and sinks of Agash.StreamTransport.Media joined to encoders, decoders and processors from any registered codec package, with pacing, loss recovery, lip sync and rooms.

Agash.StreamTransport.WebRtc.DependencyInjection

Dependency-injection wiring for the Agash.StreamTransport WebRTC stack: registers the DTLS certificate, the congestion controller, and a peer-connection factory via Microsoft.Extensions.DependencyInjection.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0-dev5 94 11/11/2026
0.2.0-dev4 122 11/3/2026
0.2.0-dev3 109 11/3/2026
0.2.0-dev2 348 11/2/2026
0.2.0-dev1 103 11/2/2026