We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call fun suspend fun RawSocketWebSocketClient( url: String, protocols: List? = null, origin: String? = null, wskey: String? = DEFAULT_WSKEY, debug: Boolean = false, connect: Boolean = true, headers: Http.Headers = Http.Headers(), masked: Boolean = true, init: WebSocketClient.() -> Unit = {}, ): WebSocketClient { if (OS.isJsBrowserOrWorker) error("RawSocketWebSocketClient is not supported on JS browser. Use WebSocketClient instead") val uri = URL(url) val secure: Boolean = uri.isSecureScheme return RawSocketWebSocketClient(coroutineContext, AsyncClient.create(secure = secure), uri, protocols, debug, origin, wskey ?: "mykey", headers, masked).also { init(it) if (connect) it.internalConnect() } } Throws an exception: key must be 16 bytes (enforced by ws.js) Correct for const val DEFAULT_WSKEY = "mywskey12345adfg"
The text was updated successfully, but these errors were encountered:
Sorry, I forgot to specify the version. 3.4.0
Sorry, something went wrong.
Fixes wrong wskey=null in RawSocketWebSocketClient + add test verifyi…
7983b54
…ng wrong length for wskey Fixes #1146
a2aa6af
…ng wrong length for wskey (#1152) Fixes #1146
Successfully merging a pull request may close this issue.
Call fun suspend fun RawSocketWebSocketClient(
url: String,
protocols: List? = null,
origin: String? = null,
wskey: String? = DEFAULT_WSKEY,
debug: Boolean = false,
connect: Boolean = true,
headers: Http.Headers = Http.Headers(),
masked: Boolean = true,
init: WebSocketClient.() -> Unit = {},
): WebSocketClient {
if (OS.isJsBrowserOrWorker) error("RawSocketWebSocketClient is not supported on JS browser. Use WebSocketClient instead")
val uri = URL(url)
val secure: Boolean = uri.isSecureScheme
return RawSocketWebSocketClient(coroutineContext, AsyncClient.create(secure = secure), uri, protocols, debug, origin, wskey ?: "mykey", headers, masked).also {
init(it)
if (connect) it.internalConnect()
}
}
Throws an exception: key must be 16 bytes (enforced by ws.js)
Correct for const val DEFAULT_WSKEY = "mywskey12345adfg"
The text was updated successfully, but these errors were encountered: