cohtml.Net.ISocketListener
The ISocketListener represents cohtml.View side of the web sockets.
Inherits from SystemIDisposable
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| virtual void | Dispose() |
| ISocketListener() | |
| virtual void | OnMessage(System.IntPtr bytes, uint length) Called when platform socket receive message new message. |
| virtual void | OnMessage(System.IntPtr bytes, uint length, OpCode opCode) Called when platform socket receive message new message. |
| virtual void | OnClose(uint code, string reason, uint length) Called when platform socket want to close connection. |
| virtual void | OnError(string message, uint length) Called when any error occurred. |
| virtual void | OnOpen() Called by platform socket to notify page about successfully connecction establishment. |
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 ISocketListener
Section titled “function ISocketListener”ISocketListener()function OnMessage
Section titled “function OnMessage”virtual void OnMessage( System.IntPtr bytes, uint length)Called when platform socket receive message new message.
Parameters:
- bytes the binary or text data which is send to the page
- length the length in bytes of the data
Warning: Will be deprecated. Use ISocketListener.OnMessage/3 instead.
function OnMessage
Section titled “function OnMessage”virtual void OnMessage( System.IntPtr bytes, uint length, OpCode opCode)Called when platform socket receive message new message.
Parameters:
- bytes the binary or text data which is send to the page
- length the length in bytes of the data
Warning: Will be deprecated. Use ISocketListener.OnMessage/3 instead.
function OnClose
Section titled “function OnClose”virtual void OnClose( uint code, string reason, uint length)Called when platform socket want to close connection.
Parameters:
- code indicates 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 data
function OnError
Section titled “function OnError”virtual void OnError( string message, uint length)Called when any error occurred.
Parameters:
- message the text data which is send to the page
- length the length in bytes of the text
function OnOpen
Section titled “function OnOpen”virtual void OnOpen()Called by platform socket to notify page about successfully connecction establishment.
Protected Attributes Documentation
Section titled “Protected Attributes Documentation”variable swigCMemOwn
Section titled “variable swigCMemOwn”bool swigCMemOwn;© 2026 Coherent Labs. All rights reserved.