Package io.ktor.client.features.websocket

Types

Link copied to clipboard
interface ClientWebSocketSession : WebSocketSession

Client specific WebSocketSession.

Link copied to clipboard
Link copied to clipboard
object WebSocketCapability : HttpClientEngineCapability<Unit>

Indicates if a client engine supports WebSockets.

Link copied to clipboard
class WebSocketException(message: String) : IllegalStateException
Link copied to clipboard
object WebSocketExtensionsCapability : HttpClientEngineCapability<Unit>

Indicates if a client engine supports extensions for WebSocket feature.

Link copied to clipboard
class WebSockets

Client WebSocket feature.

Functions

Link copied to clipboard
suspend fun HttpClient.webSocket(request: HttpRequestBuilder.() -> Unit, block: suspend DefaultClientWebSocketSession.() -> Unit)
suspend fun HttpClient.webSocket(urlString: String, request: HttpRequestBuilder.() -> Unit = {}, block: suspend DefaultClientWebSocketSession.() -> Unit)
suspend fun HttpClient.webSocket(method: HttpMethod = HttpMethod.Get, host: String = "localhost", port: Int = DEFAULT_PORT, path: String = "/", request: HttpRequestBuilder.() -> Unit = {}, block: suspend DefaultClientWebSocketSession.() -> Unit)
Link copied to clipboard
fun HttpClientConfig<*>.WebSockets(config: WebSockets.Config.() -> Unit)

Install WebSockets feature using the config as configuration.

Link copied to clipboard
suspend fun HttpClient.webSocketSession(block: HttpRequestBuilder.() -> Unit): DefaultClientWebSocketSession
suspend fun HttpClient.webSocketSession(method: HttpMethod = HttpMethod.Get, host: String = "localhost", port: Int = DEFAULT_PORT, path: String = "/", block: HttpRequestBuilder.() -> Unit = {}): DefaultClientWebSocketSession
Link copied to clipboard
suspend fun HttpClient.ws(request: HttpRequestBuilder.() -> Unit, block: suspend DefaultClientWebSocketSession.() -> Unit)
suspend fun HttpClient.ws(urlString: String, request: HttpRequestBuilder.() -> Unit = {}, block: suspend DefaultClientWebSocketSession.() -> Unit)
suspend fun HttpClient.ws(method: HttpMethod = HttpMethod.Get, host: String = "localhost", port: Int = DEFAULT_PORT, path: String = "/", request: HttpRequestBuilder.() -> Unit = {}, block: suspend DefaultClientWebSocketSession.() -> Unit)
Link copied to clipboard
suspend fun HttpClient.wss(request: HttpRequestBuilder.() -> Unit, block: suspend DefaultClientWebSocketSession.() -> Unit)
suspend fun HttpClient.wss(urlString: String, request: HttpRequestBuilder.() -> Unit = {}, block: suspend DefaultClientWebSocketSession.() -> Unit)
suspend fun HttpClient.wss(method: HttpMethod = HttpMethod.Get, host: String = "localhost", port: Int = DEFAULT_PORT, path: String = "/", request: HttpRequestBuilder.() -> Unit = {}, block: suspend DefaultClientWebSocketSession.() -> Unit)