Table of Contents

Interface IPeerClient<T>

Namespace
Backdash.Network.Client
Assembly
Backdash.dll

Client for peer communication

public interface IPeerClient<T> : IDisposable where T : struct

Type Parameters

T
Inherited Members

Methods

ProcessMessages(CancellationToken)

Start receiving messages

Task ProcessMessages(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

SendTo(SocketAddress, in T, IMessageHandler<T>?, CancellationToken)

Send Message to peer

ValueTask SendTo(SocketAddress peerAddress, in T payload, IMessageHandler<T>? callback = null, CancellationToken cancellationToken = default)

Parameters

peerAddress SocketAddress
payload T
callback IMessageHandler<T>
cancellationToken CancellationToken

Returns

ValueTask

TrySendTo(SocketAddress, in T, IMessageHandler<T>?)

Try To Send Message to peer

bool TrySendTo(SocketAddress peerAddress, in T payload, IMessageHandler<T>? callback = null)

Parameters

peerAddress SocketAddress
payload T
callback IMessageHandler<T>

Returns

bool