Scoop API

scoop:scoop.http.asyncio:0.1.0

WebSocketMessageWriter

class WebSocketMessageWriter

source · line 11
public
public class WebSocketMessageWriter internal constructor(private val state: WsState, private val message: WsOutgoing) : AsyncByteSink, AsyncCloseable

The active outgoing message. Short writes respect configured frame size; finish emits FIN after any compression boundary completes.

function flush

source · line 45
public
public override suspend fun flush(): Unit

Flushes accepted bytes, including a compression synchronization point when active, without emitting FIN.

function close

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

Closes the writer. Abandoning an unfinished message aborts its session.

function finish

source · line 58
public
public suspend fun finish(): Unit

Completes compression if selected and ends the message with FIN.