Search Results for

    Show / Hide Table of Contents

    Class WebSocket

    Implementation of the WebSocket protocol v8.

    Inheritance
    System.Object
    WebSocketBase
    WebSocket
    Implements
    IWebSocket
    Inherited Members
    WebSocketBase.RaiseOpenSuccess(WebSocketOpenArgs)
    WebSocketBase.RaiseOpenFailure(WebSocketOpenArgs, WebSocketStatusCode, Exception)
    WebSocketBase.RaiseStreamFailure(WebSocketOpenArgs, WebSocketStatusCode, Exception)
    WebSocketBase.RaiseReceive(WebSocketOpenArgs, String, Byte[])
    WebSocketBase.RaiseCloseComplete(WebSocketCloseArgs, WebSocketStatusCode, String)
    Namespace: FM.LiveSwitch
    Assembly: FM.LiveSwitch.dll
    Syntax
    public class WebSocket : WebSocketBase, IWebSocket

    Constructors

    WebSocket(String)

    Creates a new WebSocket.

    Declaration
    public WebSocket(string requestUrl)
    Parameters
    Type Name Description
    System.String requestUrl

    The target URL for the WebSocket connection.

    WebSocket(String, String)

    Creates a new WebSocket.

    Declaration
    public WebSocket(string requestUrl, string protocol)
    Parameters
    Type Name Description
    System.String requestUrl

    The target URL for the WebSocket connection.

    System.String protocol

    The WebSocket protocol.

    Properties

    BufferedAmount

    Gets the number of bytes buffered in the send queue.

    Declaration
    public int BufferedAmount { get; }
    Property Value
    Type Description
    System.Int32

    Exists

    Gets a value indicating whether WebSocket support exists on this platform.

    Declaration
    public static bool Exists { get; }
    Property Value
    Type Description
    System.Boolean

    IsOpen

    Gets a value indicating whether the WebSocket is connected.

    Declaration
    public bool IsOpen { get; }
    Property Value
    Type Description
    System.Boolean

    Protocol

    Gets the WebSocket protocol.

    Declaration
    public string Protocol { get; }
    Property Value
    Type Description
    System.String

    Secure

    Gets a value indicating whether the WebSocket is secure.

    Declaration
    public bool Secure { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    Close()

    Closes the WebSocket connection.

    Declaration
    public void Close()

    Close(WebSocketCloseArgs)

    Closes the WebSocket connection.

    Declaration
    public void Close(WebSocketCloseArgs closeArgs)
    Parameters
    Type Name Description
    WebSocketCloseArgs closeArgs

    The close arguments

    Open(WebSocketOpenArgs)

    Opens the WebSocket connection.

    Declaration
    public void Open(WebSocketOpenArgs openArgs)
    Parameters
    Type Name Description
    WebSocketOpenArgs openArgs

    The open arguments.

    Send(WebSocketSendArgs)

    Sends a message to the WebSocket server.

    Declaration
    public void Send(WebSocketSendArgs sendArgs)
    Parameters
    Type Name Description
    WebSocketSendArgs sendArgs

    The send arguments.

    Implements

    IWebSocket
    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.15.0