Class MqttClientTcpConfigurationBuilder
- Namespace
- Silverback.Messaging.Configuration.Mqtt
- Assembly
- Silverback.Integration.MQTT.dll
Builds the MqttClientTcpConfiguration.
public class MqttClientTcpConfigurationBuilder
- Inheritance
-
MqttClientTcpConfigurationBuilder
- Inherited Members
Constructors
MqttClientTcpConfigurationBuilder()
public MqttClientTcpConfigurationBuilder()
Methods
Build()
Builds the MqttClientTcpConfiguration instance.
public MqttClientTcpConfiguration Build()
Returns
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
secondsintThe 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
addressFamilyAddressFamilyThe 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
bufferSizeintThe 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
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
protocolTypeProtocolTypeThe 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
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
hoststringThe DNS host name or IP address as string.
portintThe port number.
addressFamilyAddressFamily?Optional address family; if
nullUnspecified will be used.
Returns
- MqttClientTcpConfigurationBuilder
The MqttClientTcpConfigurationBuilder so that additional calls can be chained.