openWebSocketFlow

inline fun <T : Any> <ERROR CLASS>.openWebSocketFlow(    url: String,     useSecureConnection: Boolean,     noinline checkReconnection: suspend (Throwable?) -> Boolean = { true },     noinline requestBuilder: <ERROR CLASS>.() -> Unit = {}): Flow<T>
inline fun <T : Any> <ERROR CLASS>.openWebSocketFlow(    url: String,     noinline checkReconnection: suspend (Throwable?) -> Boolean = { true },     noinline requestBuilder: <ERROR CLASS>.() -> Unit = {}): Flow<T>

Parameters

checkReconnection

This lambda will be called when it is required to reconnect to websocket to establish connection. Must return true in case if must be reconnected. By default always reconnecting