Show / Hide Table of Contents

    Class MqttClientTcpConfigurationBuilder

    Builds the MqttClientTcpConfiguration.

    Inheritance
    object
    MqttClientTcpConfigurationBuilder
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Silverback.Messaging.Configuration.Mqtt
    Assembly: Silverback.Integration.MQTT.dll
    Syntax
    public class MqttClientTcpConfigurationBuilder

    Constructors

    MqttClientTcpConfigurationBuilder()

    Builds the MqttClientTcpConfiguration.

    Declaration
    public MqttClientTcpConfigurationBuilder()

    Methods

    Build()

    Builds the MqttClientTcpConfiguration instance.

    Declaration
    public MqttClientTcpConfiguration Build()
    Returns
    Type Description
    MqttClientTcpConfiguration

    The MqttClientTcpConfiguration.

    DisableDualMode()

    Disables dual-mode on the underlying socket.

    Declaration
    public MqttClientTcpConfigurationBuilder DisableDualMode()
    Returns
    Type Description
    MqttClientTcpConfigurationBuilder

    The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

    DisableLinger()

    Disables the linger option on the underlying socket.

    Declaration
    public MqttClientTcpConfigurationBuilder DisableLinger()
    Returns
    Type Description
    MqttClientTcpConfigurationBuilder

    The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

    DisableNoDelay()

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

    Declaration
    public MqttClientTcpConfigurationBuilder DisableNoDelay()
    Returns
    Type Description
    MqttClientTcpConfigurationBuilder

    The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

    EnableDualMode()

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

    Declaration
    public MqttClientTcpConfigurationBuilder EnableDualMode()
    Returns
    Type Description
    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.

    Declaration
    public MqttClientTcpConfigurationBuilder EnableLinger(int seconds)
    Parameters
    Type Name Description
    int seconds

    The linger time in seconds.

    Returns
    Type Description
    MqttClientTcpConfigurationBuilder

    The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

    EnableNoDelay()

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

    Declaration
    public MqttClientTcpConfigurationBuilder EnableNoDelay()
    Returns
    Type Description
    MqttClientTcpConfigurationBuilder

    The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

    WithAddressFamily(AddressFamily)

    Sets the address family of the underlying socket.

    Declaration
    public MqttClientTcpConfigurationBuilder WithAddressFamily(AddressFamily addressFamily)
    Parameters
    Type Name Description
    AddressFamily addressFamily

    The address family.

    Returns
    Type Description
    MqttClientTcpConfigurationBuilder

    The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

    WithBufferSize(int)

    Sets the buffer size of the underlying socket.

    Declaration
    public MqttClientTcpConfigurationBuilder WithBufferSize(int bufferSize)
    Parameters
    Type Name Description
    int bufferSize

    The buffer size in bytes.

    Returns
    Type Description
    MqttClientTcpConfigurationBuilder

    The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

    WithLocalEndpoint(EndPoint?)

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

    Declaration
    public MqttClientTcpConfigurationBuilder WithLocalEndpoint(EndPoint? localEndpoint)
    Parameters
    Type Name Description
    EndPoint localEndpoint

    The local EndPoint or null to let the OS pick.

    Returns
    Type Description
    MqttClientTcpConfigurationBuilder

    The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

    WithProtocolType(ProtocolType)

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

    Declaration
    public MqttClientTcpConfigurationBuilder WithProtocolType(ProtocolType protocolType)
    Parameters
    Type Name Description
    ProtocolType protocolType

    The ProtocolType to use.

    Returns
    Type Description
    MqttClientTcpConfigurationBuilder

    The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

    WithRemoteEndpoint(EndPoint?)

    Sets the remote endpoint (server) to connect to.

    Declaration
    public MqttClientTcpConfigurationBuilder WithRemoteEndpoint(EndPoint? remoteEndpoint)
    Parameters
    Type Name Description
    EndPoint remoteEndpoint

    The remote EndPoint.

    Returns
    Type Description
    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.

    Declaration
    public MqttClientTcpConfigurationBuilder WithRemoteEndpoint(string host, int port, AddressFamily? addressFamily = null)
    Parameters
    Type Name Description
    string host

    The DNS host name or IP address as string.

    int port

    The port number.

    AddressFamily? addressFamily

    Optional address family; if null Unspecified will be used.

    Returns
    Type Description
    MqttClientTcpConfigurationBuilder

    The MqttClientTcpConfigurationBuilder so that additional calls can be chained.

    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini