Class WebSocketProtocolException
Thrown by WebSocketDecoder when a frame's declared payload length violates RFC 6455 section 5.2 (the reserved high bit of a 64-bit extended length is set, or the declared length exceeds MaxValue and can never be buffered as a single in-memory frame), or when it exceeds the caller-configured per-frame payload limit (RFC 6455 section 7.4.1, close code 1009).
Raised the moment the declared length is known - before any of that frame's payload bytes are copied into the decoder's reassembly buffer - so an attacker who declares an oversized length and then trickles bytes in slowly cannot force unbounded buffer growth while the decoder waits for a frame that will never legitimately complete.
Implements
Inherited Members
Namespace: Titanium.Web.Proxy
Assembly: Titanium.Web.Proxy.dll
Syntax
public sealed class WebSocketProtocolException : Exception, ISerializable
Constructors
| Edit this page View SourceWebSocketProtocolException(string, ushort)
Declaration
public WebSocketProtocolException(string message, ushort closeCode)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | |
| ushort | closeCode |
Properties
| Edit this page View SourceCloseCode
The RFC 6455 section 7.4 status code that a conformant close must report for this violation.
Declaration
public ushort CloseCode { get; }
Property Value
| Type | Description |
|---|---|
| ushort |