Class RpcPeerSession
Namespace: DotBoxD.Services.Peer
Assembly: DotBoxD.Services.dll
Owns a connected transport and the DotBoxD.Services.Peer.RpcPeer running over it.
Dispose the session to close both in the correct order.
public sealed class RpcPeerSession : IAsyncDisposableInheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object), object.Equals(object, object), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object, object), object.ToString()
Properties
Section titled “Properties”IsConnected
Section titled “ IsConnected”public bool IsConnected { get; }Property Value
Section titled “Property Value”public RpcPeer Peer { get; }Property Value
Section titled “Property Value”RemoteEndpoint
Section titled “ RemoteEndpoint”public string RemoteEndpoint { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”ConnectAsync(ITransport, ISerializer, RpcPeerOptions?, CancellationToken)
Section titled “ ConnectAsync(ITransport, ISerializer, RpcPeerOptions?, CancellationToken)”public static Task<RpcPeerSession> ConnectAsync(ITransport transport, ISerializer serializer, RpcPeerOptions? options = null, CancellationToken ct = default)Parameters
Section titled “Parameters”transport ITransport
serializer ISerializer
options RpcPeerOptions?
Returns
Section titled “Returns”ConnectAsync(ITransport, ISerializer, Action<RpcPeer>, RpcPeerOptions?, CancellationToken)
Section titled “ ConnectAsync(ITransport, ISerializer, Action<RpcPeer>, RpcPeerOptions?, CancellationToken)”public static Task<RpcPeerSession> ConnectAsync(ITransport transport, ISerializer serializer, Action<RpcPeer> configurePeer, RpcPeerOptions? options = null, CancellationToken ct = default)Parameters
Section titled “Parameters”transport ITransport
serializer ISerializer
options RpcPeerOptions?
Returns
Section titled “Returns”DisposeAsync()
Section titled “ DisposeAsync()”Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()Returns
Section titled “Returns”A task that represents the asynchronous dispose operation.
Get<TService>()
Section titled “ Get<TService>()”public TService Get<TService>() where TService : classReturns
Section titled “Returns”TService
Type Parameters
Section titled “Type Parameters”TService