Skip to content

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 : IAsyncDisposable

objectRpcPeerSession

IAsyncDisposable

object.Equals(object), object.Equals(object, object), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object, object), object.ToString()

public bool IsConnected { get; }

bool

public RpcPeer Peer { get; }

RpcPeer

public string RemoteEndpoint { get; }

string

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)

transport ITransport

serializer ISerializer

options RpcPeerOptions?

ct CancellationToken

Task<RpcPeerSession>

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)

transport ITransport

serializer ISerializer

configurePeer Action<RpcPeer>

options RpcPeerOptions?

ct CancellationToken

Task<RpcPeerSession>

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

ValueTask

A task that represents the asynchronous dispose operation.

public TService Get<TService>() where TService : class

TService

TService