Scoop API

scoop:scoop.http.client:0.1.0

HttpWebSocketSession

class HttpWebSocketSession

source · line 14
public
public class HttpWebSocketSession internal constructor(internal val state: ClientWebSocketState, private val call: ClientCall,
    /**
     * The final response or accepted handshake head.
     */
    public val head: HttpResponseHead, negotiation: WebSocketNegotiation) : AsyncCloseable

An owned HTTP/1.1 WebSocket session with handshake history and streaming messages. Successful upgrade ends the handshake total deadline; session lifecycle is explicit.

property proxyAuthenticationCount

source · line 42
public
public val proxyAuthenticationCount: Long

get: public read-only

The number of proxy authentication retries before this result.

property protocol

source · line 50
public
public val protocol: String?

get: public read-only

The selected subprotocol, or None.

property url

source · line 22
public
public val url: Url

get: public read-only

The final URL after redirects.

function receive

source · line 82
public
public suspend fun receive(): WebSocketMessage?

Returns the next owned incoming message, or None after normal session end; finish or close a message before reading the next.

function awaitClosed

source · line 117
public
public suspend fun awaitClosed(): Unit

Waits for session termination and reports its failure according to session rules.

function close

source · line 122
public
public override suspend fun close(): Unit

Closes the local session and awaits cleanup; use shutdownGracefully for an explicit close-handshake wait.

property authenticationCount

source · line 38
public
public val authenticationCount: Long

get: public read-only

The number of origin authentication retries before this result.

property retryCount

source · line 34
public
public val retryCount: Long

get: public read-only

The number of retries before this result.