Table of Contents

Class TcpClientAdapter

Namespace
RabbitMQ.Client
Assembly
RabbitMQ.Client.dll

Simple wrapper around Socket.

public class TcpClientAdapter : ITcpClient, IDisposable
Inheritance
TcpClientAdapter
Implements
Inherited Members

Constructors

TcpClientAdapter(Socket)

public TcpClientAdapter(Socket socket)

Parameters

socket Socket

Properties

Client

public virtual Socket Client { get; }

Property Value

Socket

Connected

public virtual bool Connected { get; }

Property Value

bool

ReceiveTimeout

public virtual TimeSpan ReceiveTimeout { get; set; }

Property Value

TimeSpan

Methods

Close()

public virtual void Close()

ConnectAsync(IPAddress, int, CancellationToken)

public virtual Task ConnectAsync(IPAddress ep, int port, CancellationToken cancellationToken = default)

Parameters

ep IPAddress
port int
cancellationToken CancellationToken

Returns

Task

Dispose()

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

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

GetMatchingHost(IReadOnlyCollection<IPAddress>, AddressFamily)

public static IPAddress? GetMatchingHost(IReadOnlyCollection<IPAddress> addresses, AddressFamily addressFamily)

Parameters

addresses IReadOnlyCollection<IPAddress>
addressFamily AddressFamily

Returns

IPAddress

GetStream()

public virtual NetworkStream GetStream()

Returns

NetworkStream