-
public final class StreamSocketConfigConfiguration for the Stream WebSocket connection.
Holds both identity (URL, API key, auth type) and operational tunables (health check timing, event aggregation, connection timeout). Products pass this to the StreamClient factory to describe their socket.
// Coordinator socket — standard timing val coordinatorSocket = StreamSocketConfig.jwt( url = StreamWsUrl.fromString("wss://chat.stream-io-api.com/connect"), apiKey = apiKey, clientInfoHeader = clientInfo, ) // SFU socket — aggressive timing, low aggregation threshold val sfuSocket = StreamSocketConfig.jwt( url = StreamWsUrl.fromString("wss://sfu.stream-io-api.com"), apiKey = apiKey, clientInfoHeader = clientInfo, healthCheckIntervalMs = 5_000, livenessThresholdMs = 15_000, connectionTimeoutMs = 2_000, aggregationThreshold = 10, aggregationMaxWindowMs = 200, )
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classStreamSocketConfig.CompanionDefault values for StreamSocketConfig fields.
-
Field Summary
Fields Modifier and Type Field Description private final StreamWsUrlurlprivate final StreamApiKeyapiKeyprivate final StringauthTypeprivate final StreamHttpClientInfoHeaderclientInfoHeaderprivate final LonghealthCheckIntervalMsprivate final LonglivenessThresholdMsprivate final LongconnectionTimeoutMsprivate final IntegeraggregationThresholdprivate final LongaggregationMaxWindowMsprivate final IntegeraggregationDispatchQueueCapacity
-
Method Summary
Modifier and Type Method Description final StreamWsUrlgetUrl()final StreamApiKeygetApiKey()final StringgetAuthType()final StreamHttpClientInfoHeadergetClientInfoHeader()final LonggetHealthCheckIntervalMs()final LonggetLivenessThresholdMs()final LonggetConnectionTimeoutMs()final IntegergetAggregationThreshold()final LonggetAggregationMaxWindowMs()final IntegergetAggregationDispatchQueueCapacity()-
-
Method Detail
-
getUrl
final StreamWsUrl getUrl()
-
getApiKey
final StreamApiKey getApiKey()
-
getAuthType
final String getAuthType()
-
getClientInfoHeader
final StreamHttpClientInfoHeader getClientInfoHeader()
-
getHealthCheckIntervalMs
final Long getHealthCheckIntervalMs()
-
getLivenessThresholdMs
final Long getLivenessThresholdMs()
-
getConnectionTimeoutMs
final Long getConnectionTimeoutMs()
-
getAggregationThreshold
final Integer getAggregationThreshold()
-
getAggregationMaxWindowMs
final Long getAggregationMaxWindowMs()
-
getAggregationDispatchQueueCapacity
final Integer getAggregationDispatchQueueCapacity()
-
-
-
-