ClientConnectionConfig

abstract class ClientConnectionConfig(val host: String, port: Int? = null, val protocol: URLProtocol = URLProtocol.HTTPS, val headers: Map<String, String> = emptyMap(), val reconnectionDelay: Duration? = null, val requestTimeout: Duration? = 5.seconds, val connectTimeout: Duration? = 15.seconds) : ConnectionConfig(source)

Configuration details for managing client connections.

Inheritors

Constructors

Link copied to clipboard
constructor(host: String, port: Int? = null, protocol: URLProtocol = URLProtocol.HTTPS, headers: Map<String, String> = emptyMap(), reconnectionDelay: Duration? = null, requestTimeout: Duration? = 5.seconds, connectTimeout: Duration? = 15.seconds)

Properties

Link copied to clipboard

The maximum duration to wait while establishing a connection to the server. Defaults to 15 seconds.

Link copied to clipboard

A map of custom headers to include with each request.

Link copied to clipboard

A computed property that constructs the URL endpoint for health check requests.

Link copied to clipboard

The hostname or IP address of the server to connect to.

Link copied to clipboard
val jsonConfig: Json

Provides access to the current JSON serialization and deserialization configuration.

Link copied to clipboard

Constructs the URL endpoint for sending or receiving messages.

Link copied to clipboard
val port: Int

The port number used for establishing the connection.

Link copied to clipboard
val protocol: URLProtocol

The protocol used for the connection, such as "http" or "https".

Link copied to clipboard

An optional delay duration before attempting to reconnect after a connection loss.

Link copied to clipboard

The maximum duration to wait for an individual HTTP request to complete. Defaults to 5 seconds.

Link copied to clipboard

Constructs the URL endpoint for Server-Sent Events (SSE) communication.

Link copied to clipboard
val url: String

Provides the base URL for the current connection configuration. Constructs the URL using the protocol, host, and port specified in the connection configuration.

Functions

Link copied to clipboard
fun appendSerializersModule(module: SerializersModule)

Appends the specified serializers module to the existing JSON configuration. This method allows dynamic addition of custom serialization and deserialization logic by merging the provided module with the current serializers module.