The Session class represents a Yamux session, allowing multiple logical streams over a single connection.
internal Session(ITransport connection, bool isClient, bool keepTransportOpenOnClose = false, SessionOptions? options = null)TimeSpan? RTT Most recent round-trip time measurement.Statistics? Stats Bandwidth and byte statistics.bool IsClosed Indicates if the session is closed.ValueTask<IDuplexSessionChannel> OpenChannelAsync(SessionChannelOptions options, bool waitForAcknowledgement = false, CancellationToken? cancel = null)
SessionException if the session is closed or remote sent GoAway.ValueTask<IDuplexSessionChannel> OpenChannelAsync(bool waitForAcknowledgement = false, CancellationToken? cancel = null)
ValueTask<IDuplexSessionChannel> AcceptAsync(CancellationToken? cancel = null)
ValueTask<IDuplexSessionChannel> AcceptAsync(SessionChannelOptions channelOptions, CancellationToken? cancel)
ValueTask<IReadOnlySessionChannel> AcceptReadOnlyChannelAsync(CancellationToken? cancel)
ValueTask<TimeSpan> PingAsync(CancellationToken cancellation)
void Start()
SessionException if already closed.Task CloseAsync()
Task GoAwayAsync(SessionTermination sessionTermination = SessionTermination.Normal, CancellationToken? cancel = null)
Task<bool> CloseOpenChannelsAsync(TimeSpan timeout)
ValueTask DisposeAsync()
SessionException Thrown for protocol or session errors.SessionChannelException Thrown for channel-specific errors.See SessionOptions and SessionChannelOptions for configuration details.