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(string, int)

public virtual Task ConnectAsync(string host, int port)

Parameters

host string
port int

Returns

Task

Dispose()

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