Search Results for

    Show / Hide Table of Contents

    Class WebSocketFrameEncoder

    Encodes WebSocketFrame values to RFC 6455 wire bytes.

    Inheritance
    object
    WebSocketFrameEncoder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Titanium.Web.Proxy
    Assembly: Titanium.Web.Proxy.dll
    Syntax
    public static class WebSocketFrameEncoder

    Methods

    | Edit this page View Source

    Encode(WebsocketOpCode, ReadOnlySpan<byte>, bool, bool, uint)

    Builds a single WebSocket frame.

    Declaration
    public static byte[] Encode(WebsocketOpCode opCode, ReadOnlySpan<byte> payload, bool mask, bool isFinal = true, uint maskKey = 0)
    Parameters
    Type Name Description
    WebsocketOpCode opCode

    Frame opcode.

    ReadOnlySpan<byte> payload

    Unmasked payload.

    bool mask

    When true, apply a masking key (required client→server).

    bool isFinal

    FIN bit.

    uint maskKey

    Optional fixed mask key (tests); when 0 a random key is used.

    Returns
    Type Description
    byte[]
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX