cohtml.Net.IClientSideSocket

The IClientSideSocket represents platform/client specific part of the web sockets.

Inherits from SystemIDisposable

Inherited by cohtml.CohtmlWebSocketWrapper

Public Functions

Name
virtual voidDispose()
IClientSideSocket()
virtual voidSend(System.IntPtr bytes, uint length)
Called when the JS web socket want to send text data to the server.
virtual voidSend(System.IntPtr bytes, uint length, OpCode opCode)
Called when the JS web socket want to send text data to the server.
virtual uintGetBufferedAmount()
Called when the JS web socket want to get buffered amount of data.
virtual stringGetProtocol()
Called when the JS web socket want to name of the sub-protocol the server selected.
virtual voidClose(uint code, string reason, uint length)
Called when the JS web socket want to close the connection with server.
virtual voidTerminate(uint code, string reason, uint length)
Called when the JS web socket will no longer will call IClientSideSocket and now is safe to destroy this object. The method must close the connection to the server and also it’s no longer safe to use a.
delegate voidSwigDelegateIClientSideSocket_0(System.IntPtr bytes, uint length, global.System.IntPtr swigId)
delegate voidSwigDelegateIClientSideSocket_1(System.IntPtr bytes, uint length, int opCode, global.System.IntPtr swigId)
delegate uintSwigDelegateIClientSideSocket_2(global.System.IntPtr swigId)
delegate stringSwigDelegateIClientSideSocket_3(global.System.IntPtr swigId)
delegate voidSwigDelegateIClientSideSocket_4(uint code, string reason, uint length, global.System.IntPtr swigId)
delegate voidSwigDelegateIClientSideSocket_5(uint code, string reason, uint length, global.System.IntPtr swigId)

Protected Attributes

Name
boolswigCMemOwn

Public Functions Documentation

function Dispose

virtual void Dispose()

function IClientSideSocket

IClientSideSocket()

function Send

virtual void Send(
    System.IntPtr bytes,
    uint length
)

Called when the JS web socket want to send text data to the server.

Parameters:

  • bytes text data which is send to the server
  • length the length in bytes of the data

Warning: Will be deprecated, implement IClientSideSocket.Send/3 instead.

function Send

virtual void Send(
    System.IntPtr bytes,
    uint length,
    OpCode opCode
)

Called when the JS web socket want to send text data to the server.

Parameters:

  • bytes text data which is send to the server
  • length the length in bytes of the data

Warning: Will be deprecated, implement IClientSideSocket.Send/3 instead.

function GetBufferedAmount

virtual uint GetBufferedAmount()

Called when the JS web socket want to get buffered amount of data.

Return: the number of bytes of data that have been queued using calls to IClientSideSocket.Send()

function GetProtocol

virtual string GetProtocol()

Called when the JS web socket want to name of the sub-protocol the server selected.

Return: selected sub-protocol

function Close

virtual void Close(
    uint code,
    string reason,
    uint length
)

Called when the JS web socket want to close the connection with server.

Parameters:

  • code indicate the status code explaining why the connection is being closed
  • reason a human-readable string explaining why the connection is closing
  • length the length in bytes of the reason

Reimplemented by: cohtml.CohtmlWebSocketWrapper.Close

function Terminate

virtual void Terminate(
    uint code,
    string reason,
    uint length
)

Called when the JS web socket will no longer will call IClientSideSocket and now is safe to destroy this object. The method must close the connection to the server and also it’s no longer safe to use a.

Parameters:

  • code indicate the status code explaining why the connection is being closed
  • reason a human-readable string explaining why the connection is closing
  • length the length in bytes of the reason

Reimplemented by: cohtml.CohtmlWebSocketWrapper.Terminate

function SwigDelegateIClientSideSocket_0

delegate void SwigDelegateIClientSideSocket_0(
    System.IntPtr bytes,
    uint length,
    global.System.IntPtr swigId
)

function SwigDelegateIClientSideSocket_1

delegate void SwigDelegateIClientSideSocket_1(
    System.IntPtr bytes,
    uint length,
    int opCode,
    global.System.IntPtr swigId
)

function SwigDelegateIClientSideSocket_2

delegate uint SwigDelegateIClientSideSocket_2(
    global.System.IntPtr swigId
)

function SwigDelegateIClientSideSocket_3

delegate string SwigDelegateIClientSideSocket_3(
    global.System.IntPtr swigId
)

function SwigDelegateIClientSideSocket_4

delegate void SwigDelegateIClientSideSocket_4(
    uint code,
    string reason,
    uint length,
    global.System.IntPtr swigId
)

function SwigDelegateIClientSideSocket_5

delegate void SwigDelegateIClientSideSocket_5(
    uint code,
    string reason,
    uint length,
    global.System.IntPtr swigId
)

Protected Attributes Documentation

variable swigCMemOwn

bool swigCMemOwn;