cohtml.Net.IClientSideSocket
The IClientSideSocket represents platform/client specific part of the web sockets.
Inherits from SystemIDisposable
Inherited by cohtml.CohtmlWebSocketWrapper
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| 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. |
| virtual void | Send(System.IntPtr bytes, uint length, OpCode opCode) Called when the JS web socket want to send text data to the server. |
| virtual uint | GetBufferedAmount() Called when the JS web socket want to get buffered amount of data. |
| virtual string | GetProtocol() Called when the JS web socket want to name of the sub-protocol the server selected. |
| virtual void | Close(uint code, string reason, uint length) Called when the JS web socket want to close the connection with server. |
| 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. |
| 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) |
Protected Attributes
Section titled “Protected Attributes”| Name | |
|---|---|
| bool | swigCMemOwn |
Public Functions Documentation
Section titled “Public Functions Documentation”function Dispose
Section titled “function Dispose”virtual void Dispose()function IClientSideSocket
Section titled “function IClientSideSocket”IClientSideSocket()function Send
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “function SwigDelegateIClientSideSocket_0”delegate void SwigDelegateIClientSideSocket_0( System.IntPtr bytes, uint length, global.System.IntPtr swigId)function SwigDelegateIClientSideSocket_1
Section titled “function SwigDelegateIClientSideSocket_1”delegate void SwigDelegateIClientSideSocket_1( System.IntPtr bytes, uint length, int opCode, global.System.IntPtr swigId)function SwigDelegateIClientSideSocket_2
Section titled “function SwigDelegateIClientSideSocket_2”delegate uint SwigDelegateIClientSideSocket_2( global.System.IntPtr swigId)function SwigDelegateIClientSideSocket_3
Section titled “function SwigDelegateIClientSideSocket_3”delegate string SwigDelegateIClientSideSocket_3( global.System.IntPtr swigId)function SwigDelegateIClientSideSocket_4
Section titled “function SwigDelegateIClientSideSocket_4”delegate void SwigDelegateIClientSideSocket_4( uint code, string reason, uint length, global.System.IntPtr swigId)function SwigDelegateIClientSideSocket_5
Section titled “function SwigDelegateIClientSideSocket_5”delegate void SwigDelegateIClientSideSocket_5( uint code, string reason, uint length, global.System.IntPtr swigId)Protected Attributes Documentation
Section titled “Protected Attributes Documentation”variable swigCMemOwn
Section titled “variable swigCMemOwn”bool swigCMemOwn;© 2026 Coherent Labs. All rights reserved.