Unosquare
    Show / Hide Table of Contents

    Interface IWebSocketContext

    Represents the context of a WebSocket connection.

    Namespace: EmbedIO.WebSockets
    Syntax
    public interface IWebSocketContext

    Properties

    AcceptedProtocol

    The accepted subprotocol.

    Declaration
    string AcceptedProtocol { get; }
    Property Value
    Type Description
    String

    CancellationToken

    Gets the CancellationToken used to cancel operations.

    Declaration
    CancellationToken CancellationToken { get; }
    Property Value
    Type Description
    CancellationToken

    Cookies

    The cookies that were passed to the server during the opening handshake.

    Declaration
    ICookieCollection Cookies { get; }
    Property Value
    Type Description
    ICookieCollection

    Headers

    The HTTP headers that were sent to the server during the opening handshake.

    Declaration
    NameValueCollection Headers { get; }
    Property Value
    Type Description
    NameValueCollection

    HttpContextId

    Gets the unique identifier of the opening handshake HTTP context.

    Declaration
    string HttpContextId { get; }
    Property Value
    Type Description
    String

    Id

    Gets a unique identifier for a WebSocket context.

    Declaration
    string Id { get; }
    Property Value
    Type Description
    String

    IsAuthenticated

    Whether the WebSocket client is authenticated.

    Declaration
    bool IsAuthenticated { get; }
    Property Value
    Type Description
    Boolean

    IsLocal

    Whether the WebSocket client connected from the local machine.

    Declaration
    bool IsLocal { get; }
    Property Value
    Type Description
    Boolean

    IsSecureConnection

    Whether the WebSocket connection is secured using Secure Sockets Layer (SSL).

    Declaration
    bool IsSecureConnection { get; }
    Property Value
    Type Description
    Boolean

    Items

    Gets the dictionary of data associated with the opening handshake HTTP context.

    Declaration
    IDictionary<object, object> Items { get; }
    Property Value
    Type Description
    IDictionary<Object, Object>

    LocalEndPoint

    Gets the server IP address and port number to which the opening handshake request is directed.

    Declaration
    IPEndPoint LocalEndPoint { get; }
    Property Value
    Type Description
    IPEndPoint

    Origin

    The value of the Origin HTTP header included in the opening handshake.

    Declaration
    string Origin { get; }
    Property Value
    Type Description
    String

    RemoteEndPoint

    Gets the client IP address and port number from which the opening handshake request originated.

    Declaration
    IPEndPoint RemoteEndPoint { get; }
    Property Value
    Type Description
    IPEndPoint

    RequestedProtocols

    The list of subprotocols requested by the WebSocket client.

    Declaration
    IEnumerable<string> RequestedProtocols { get; }
    Property Value
    Type Description
    IEnumerable<String>

    RequestUri

    The URI requested by the WebSocket client.

    Declaration
    Uri RequestUri { get; }
    Property Value
    Type Description
    Uri

    Session

    Gets the session proxy associated with the opening handshake HTTP context.

    Declaration
    ISessionProxy Session { get; }
    Property Value
    Type Description
    ISessionProxy

    User

    An object used to obtain identity, authentication information, and security roles for the WebSocket client.

    Declaration
    IPrincipal User { get; }
    Property Value
    Type Description
    IPrincipal

    WebSocket

    The IWebSocket interface used to interact with the WebSocket connection.

    Declaration
    IWebSocket WebSocket { get; }
    Property Value
    Type Description
    IWebSocket

    WebSocketVersion

    The value of the SecWebSocketKey HTTP header included in the opening handshake.

    Declaration
    string WebSocketVersion { get; }
    Property Value
    Type Description
    String

    Comments

    Back to top Copyright © 2017-2019 Unosquare