class WebSocketMessageValidator
source · line 7public class WebSocketMessageValidator public constructor(
/**
* Whether the validated message is text or binary.
*/
public val type: WebSocketMessageType,
/**
* The maximum accepted message size in bytes.
*/
public val maxBytes: Long) : Closeable
- Supertype
Closeable - Inherited
fun dispose(): Unit· Closeable
Validates the final message byte stream against a size limit and, for text, incremental UTF-8 validity. Feed decompressed bytes when compression is used.
property isFinished
source · line 39public val isFinished: Boolean
get: public read-only
Whether final message validation completed successfully.
getter get
source · line 39get(): Boolean
property type
source · line 11public val type: WebSocketMessageType
get: public read-only
Whether the validated message is text or binary.
function close
source · line 81public override fun close(): Unit
- Overrides
close
Releases validation resources without asserting successful message completion.
function receive
source · line 49public fun receive(data: List<Byte>): Unit
Accepts the next uncompressed message bytes, checking the byte limit and incremental UTF-8 when required.
parameter data
source · line 49data: List<Byte>
constructor constructor
source · line 7constructor(public val type: WebSocketMessageType, public val maxBytes: Long)
parameter maxBytes
source · line 15public val maxBytes: Long
parameter type
source · line 11public val type: WebSocketMessageType
property isClosed
source · line 35public val isClosed: Boolean
get: public read-only
Whether validation resources have been released.
getter get
source · line 35get(): Boolean
property failure
source · line 43public val failure: Throwable?
get: public read-only
The retained validation or cleanup failure.
getter get
source · line 43get(): Option<Throwable>
property maxBytes
source · line 15public val maxBytes: Long
get: public read-only
The maximum accepted message size in bytes.
property byteCount
source · line 31public val byteCount: Long
get: public read-only
The bytes successfully accepted so far.
getter get
source · line 31get(): Long
function finish
source · line 66public fun finish(): Unit
Validates final UTF-8 completion and releases the validator; no more message data may follow.