Skip to content

ConnectParametersBuilder

Provides a builder for creating and configuring ConnectParameters.

Methods:

ConnectParametersBuilder WithHost(String)

Sets the host name for the connection.

ConnectParametersBuilder WithHost(String, Int32)

Sets the host name and port number for the connection.

ConnectParametersBuilder WithPort(Int32)

Sets the port number for the connection.

ConnectParametersBuilder WithTLS(Boolean)

Enables the use of TLS for the connection to open a secure communication channel between the client and broker.

ConnectParametersBuilder WithTransport(SupportedTransports)

Sets the transport protocol for the connection.

ConnectParametersBuilder WithPath(String)

Sets the path for WebSocket connections.

ConnectParametersBuilder WithVirtualHost(String)

Sets the virtual host for the connection.

ConnectParametersBuilder WithCredentials(Credentials)

Sets the credentials for authentication with the broker.

ConnectParametersBuilder WithHeartBeat(TimeSpan, TimeSpan, TimeSpan)

Sets the heartbeat preferences for the connection.

ConnectParametersBuilder WithHeader(String, String)

Adds a custom header to the connection parameters.

ConnectParameters Build()

Builds and returns the configured ConnectParameters instance.

Comments