Table of Contents

Interface IPeerSocket

Namespace
Backdash.Network.Client
Assembly
Backdash.dll

Socket abstraction over peers

public interface IPeerSocket : IDisposable
Inherited Members

Properties

AddressFamily

AddressFamily AddressFamily { get; }

Property Value

AddressFamily

Port

Binding port

int Port { get; }

Property Value

int

Methods

Close()

void Close()

ReceiveAsync(Memory<byte>, CancellationToken)

Receives data and returns the endpoint of the sending host.

ValueTask<SocketReceiveFromResult> ReceiveAsync(Memory<byte> buffer, CancellationToken cancellationToken)

Parameters

buffer Memory<byte>
cancellationToken CancellationToken

Returns

ValueTask<SocketReceiveFromResult>

ReceiveFromAsync(Memory<byte>, SocketAddress, CancellationToken)

Receive bytes from specified remote host

ValueTask<int> ReceiveFromAsync(Memory<byte> buffer, SocketAddress address, CancellationToken cancellationToken)

Parameters

buffer Memory<byte>
address SocketAddress
cancellationToken CancellationToken

Returns

ValueTask<int>

SendToAsync(ReadOnlyMemory<byte>, EndPoint, CancellationToken)

Sends data to the specified remote host.

ValueTask<int> SendToAsync(ReadOnlyMemory<byte> buffer, EndPoint remoteEndPoint, CancellationToken cancellationToken)

Parameters

buffer ReadOnlyMemory<byte>
remoteEndPoint EndPoint
cancellationToken CancellationToken

Returns

ValueTask<int>

SendToAsync(ReadOnlyMemory<byte>, SocketAddress, CancellationToken)

Sends data to the specified remote host.

ValueTask<int> SendToAsync(ReadOnlyMemory<byte> buffer, SocketAddress socketAddress, CancellationToken cancellationToken)

Parameters

buffer ReadOnlyMemory<byte>
socketAddress SocketAddress
cancellationToken CancellationToken

Returns

ValueTask<int>