Table of Contents

Class MqttClientTcpConfigurationBuilder

Namespace
Silverback.Messaging.Configuration.Mqtt
Assembly
Silverback.Integration.MQTT.dll
public class MqttClientTcpConfigurationBuilder
Inheritance
MqttClientTcpConfigurationBuilder
Inherited Members

Constructors

MqttClientTcpConfigurationBuilder()

public MqttClientTcpConfigurationBuilder()

Methods

Build()

Builds the MqttClientTcpConfiguration instance.

public MqttClientTcpConfiguration Build()

Returns

MqttClientTcpConfiguration

The MqttClientTcpConfiguration.

DisableDualMode()

Disables dual-mode on the underlying socket.

public MqttClientTcpConfigurationBuilder DisableDualMode()

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

DisableLinger()

Disables the linger option on the underlying socket.

public MqttClientTcpConfigurationBuilder DisableLinger()

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

DisableNoDelay()

Disables the TCP no-delay option (enable Nagle's algorithm).

public MqttClientTcpConfigurationBuilder DisableNoDelay()

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

EnableDualMode()

Enables dual-mode on the underlying socket (IPv4 & IPv6).

public MqttClientTcpConfigurationBuilder EnableDualMode()

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

EnableLinger(int)

Enables the linger option on the underlying socket and sets the linger time in seconds.

public MqttClientTcpConfigurationBuilder EnableLinger(int seconds)

Parameters

seconds int

The linger time in seconds.

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

EnableNoDelay()

Enables the TCP no-delay option (disable Nagle's algorithm).

public MqttClientTcpConfigurationBuilder EnableNoDelay()

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

WithAddressFamily(AddressFamily)

Sets the address family of the underlying socket.

public MqttClientTcpConfigurationBuilder WithAddressFamily(AddressFamily addressFamily)

Parameters

addressFamily AddressFamily

The address family.

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

WithBufferSize(int)

Sets the buffer size of the underlying socket.

public MqttClientTcpConfigurationBuilder WithBufferSize(int bufferSize)

Parameters

bufferSize int

The buffer size in bytes.

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

WithLocalEndpoint(EndPoint?)

Sets the local endpoint (network interface) to be used by the client.

public MqttClientTcpConfigurationBuilder WithLocalEndpoint(EndPoint? localEndpoint)

Parameters

localEndpoint EndPoint

The local EndPoint or null to let the OS pick.

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

WithProtocolType(ProtocolType)

Sets the protocol type used by the underlying socket (usually TCP).

public MqttClientTcpConfigurationBuilder WithProtocolType(ProtocolType protocolType)

Parameters

protocolType ProtocolType

The ProtocolType to use.

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

WithRemoteEndpoint(EndPoint?)

Sets the remote endpoint (server) to connect to.

public MqttClientTcpConfigurationBuilder WithRemoteEndpoint(EndPoint? remoteEndpoint)

Parameters

remoteEndpoint EndPoint

The remote EndPoint.

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

WithRemoteEndpoint(string, int, AddressFamily?)

Sets the remote endpoint (server) to connect to by creating a DnsEndPoint from the provided host and port.

public MqttClientTcpConfigurationBuilder WithRemoteEndpoint(string host, int port, AddressFamily? addressFamily = null)

Parameters

host string

The DNS host name or IP address as string.

port int

The port number.

addressFamily AddressFamily?

Optional address family; if null Unspecified will be used.

Returns

MqttClientTcpConfigurationBuilder

The MqttClientTcpConfigurationBuilder so that additional calls can be chained.