class WebSocketFrameDecoder
source · line 9public class WebSocketFrameDecoder public constructor(
/**
* The endpoint role determining incoming/outgoing masking requirements.
*/
public val role: HttpRole, compressionEnabled: Boolean = false,
limits: WebSocketFrameLimits = WebSocketFrameLimits()) : Closeable
- Supertype
Closeable - Inherited
fun dispose(): Unit· Closeable
A serial incremental frame parser that validates masking, fragmentation, control frames, and limits. Compression flag acceptance does not itself inflate message data.
constructor constructor
source · line 9constructor(public val role: HttpRole, compressionEnabled: Boolean = false, limits: WebSocketFrameLimits = WebSocketFrameLimits())
parameter limits
source · line 14limits: WebSocketFrameLimits = WebSocketFrameLimits()
parameter compressionEnabled
source · line 13compressionEnabled: Boolean = false
parameter role
source · line 13public val role: HttpRole
function close
source · line 99public override fun close(): Unit
- Overrides
close
Releases local state; it does not send a Close frame or close a transport.
property role
source · line 13public val role: HttpRole
get: public read-only
The endpoint role determining incoming/outgoing masking requirements.
property isClosed
source · line 22public val isClosed: Boolean
get: public read-only
Whether local frame state has been closed.
getter get
source · line 22get(): Boolean
property failure
source · line 38public val failure: Throwable?
get: public read-only
The retained framing or message failure.
getter get
source · line 38get(): Option<Throwable>
property isFinished
source · line 26public val isFinished: Boolean
get: public read-only
Whether the terminal End event has been removed.
getter get
source · line 26get(): Boolean
function nextEvent
source · line 72public fun nextEvent(): WebSocketFrameEvent?
Removes the next parsed event, or returns None when no event is ready.
property hasCloseFrame
source · line 30public val hasCloseFrame: Boolean
get: public read-only
Whether a close frame has been processed.
getter get
source · line 30get(): Boolean
property closeFrame
source · line 34public val closeFrame: WebSocketClose?
get: public read-only
The parsed close payload, once a close frame has arrived.
getter get
source · line 34get(): Option<WebSocketClose>
function receive
source · line 44public fun receive(buffer: NativeByteBuffer, count: Long = buffer.readableBytes): Long
Consumes a prefix of the readable buffer and advances by the returned count. A pending event can stop progress; drain events before supplying more bytes.
parameter buffer
source · line 44buffer: NativeByteBuffer
parameter count
source · line 44count: Long = buffer.readableBytes
function endInput
source · line 87public fun endInput(): Unit
Reports transport EOF and advances final validation; incomplete framing or unclosed protocol state is reported as a failure.