Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    Exception
    WebSocketProtocolException
    Implements
    ISerializable
    Inherited Members
    Exception.GetBaseException()
    Exception.GetType()
    Exception.ToString()
    Exception.Data
    Exception.HelpLink
    Exception.HResult
    Exception.InnerException
    Exception.Message
    Exception.Source
    Exception.StackTrace
    Exception.TargetSite
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.ReferenceEquals(object, object)
    Namespace: Titanium.Web.Proxy
    Assembly: Titanium.Web.Proxy.dll
    Syntax
    public sealed class WebSocketProtocolException : Exception, ISerializable

    Constructors

    | Edit this page View Source

    WebSocketProtocolException(string, ushort)

    Declaration
    public WebSocketProtocolException(string message, ushort closeCode)
    Parameters
    Type Name Description
    string message
    ushort closeCode

    Properties

    | Edit this page View Source

    CloseCode

    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

    Implements

    ISerializable
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX