Skip to content
SiteEmail

cohtml.Net.IClientSideSocket

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

Inherits from SystemIDisposable

Inherited by cohtml.CohtmlWebSocketWrapper

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)
Name
boolswigCMemOwn
virtual void Dispose()
IClientSideSocket()
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.

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.

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()

virtual string GetProtocol()

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

Return: selected sub-protocol

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

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

delegate void SwigDelegateIClientSideSocket_0(
System.IntPtr bytes,
uint length,
global.System.IntPtr swigId
)
delegate void SwigDelegateIClientSideSocket_1(
System.IntPtr bytes,
uint length,
int opCode,
global.System.IntPtr swigId
)
delegate uint SwigDelegateIClientSideSocket_2(
global.System.IntPtr swigId
)
delegate string SwigDelegateIClientSideSocket_3(
global.System.IntPtr swigId
)
delegate void SwigDelegateIClientSideSocket_4(
uint code,
string reason,
uint length,
global.System.IntPtr swigId
)
delegate void SwigDelegateIClientSideSocket_5(
uint code,
string reason,
uint length,
global.System.IntPtr swigId
)
bool swigCMemOwn;