ktor-client-cio / io.ktor.client.features.websocket / io.ktor.client.HttpClient

Extensions for io.ktor.client.HttpClient

webSocketRaw

suspend fun HttpClient.webSocketRaw(method: HttpMethod = HttpMethod.Get, host: String = "localhost", port: Int = DEFAULT_PORT, path: String = "/", request: HttpRequestBuilder.() -> Unit = {}, block: suspend ClientWebSocketSession.() -> Unit): Unit

Create raw ClientWebSocketSession: no ping-pong and other service messages are used.

webSocketRawSession

suspend fun HttpClient.webSocketRawSession(method: HttpMethod = HttpMethod.Get, host: String = "localhost", port: Int = DEFAULT_PORT, path: String = "/", block: HttpRequestBuilder.() -> Unit = {}): ClientWebSocketSession

Create raw ClientWebSocketSession: no ping-pong and other service messages are used.

ws

suspend fun HttpClient.ws(urlString: String, request: HttpRequestBuilder.() -> Unit = {}, block: suspend DefaultClientWebSocketSession.() -> Unit): Unit

Open DefaultClientWebSocketSession.

wsRaw

suspend fun HttpClient.wsRaw(method: HttpMethod = HttpMethod.Get, host: String = "localhost", port: Int = DEFAULT_PORT, path: String = "/", request: HttpRequestBuilder.() -> Unit = {}, block: suspend ClientWebSocketSession.() -> Unit): Unit

Create raw ClientWebSocketSession: no ping-pong and other service messages are used.

wssRaw

suspend fun HttpClient.wssRaw(method: HttpMethod = HttpMethod.Get, host: String = "localhost", port: Int = DEFAULT_PORT, path: String = "/", request: HttpRequestBuilder.() -> Unit = {}, block: suspend ClientWebSocketSession.() -> Unit): Unit

Create secure raw ClientWebSocketSession: no ping-pong and other service messages are used.