Tanoda
HybridWebSocket.IWebSocket Interface Reference

WebSocket class interface shared by both native and JSLIB implementation. More...

Inheritance diagram for HybridWebSocket.IWebSocket:
HybridWebSocket.WebSocket

Public Member Functions

void Connect ()
 Open WebSocket connection More...
 
void Close (WebSocketCloseCode code=WebSocketCloseCode.Normal, string reason=null)
 Close WebSocket connection with optional status code and reason. More...
 
void Send (byte[] data)
 Send binary data over the socket. More...
 
WebSocketState GetState ()
 Return WebSocket connection state. More...
 

Events

WebSocketOpenEventHandler OnOpen
 Occurs when the connection is opened. More...
 
WebSocketMessageEventHandler OnMessage
 Occurs when a message is received. More...
 
WebSocketErrorEventHandler OnError
 Occurs when an error was reported from WebSocket. More...
 
WebSocketCloseEventHandler OnClose
 Occurs when the socked was closed. More...
 

Detailed Description

WebSocket class interface shared by both native and JSLIB implementation.

Definition at line 75 of file WebSocket.cs.

Member Function Documentation

◆ Close()

void HybridWebSocket.IWebSocket.Close ( WebSocketCloseCode  code = WebSocketCloseCode.Normal,
string  reason = null 
)

Close WebSocket connection with optional status code and reason.

Parameters
codeClose status code.
reasonReason string.

Implemented in HybridWebSocket.WebSocket.

◆ Connect()

void HybridWebSocket.IWebSocket.Connect ( )

Open WebSocket connection

Implemented in HybridWebSocket.WebSocket.

◆ GetState()

WebSocketState HybridWebSocket.IWebSocket.GetState ( )

Return WebSocket connection state.

Returns
The state.

Implemented in HybridWebSocket.WebSocket.

◆ Send()

void HybridWebSocket.IWebSocket.Send ( byte[]  data)

Send binary data over the socket.

Parameters
dataPayload data.

Implemented in HybridWebSocket.WebSocket.

Event Documentation

◆ OnClose

WebSocketCloseEventHandler HybridWebSocket.IWebSocket.OnClose

Occurs when the socked was closed.

Definition at line 119 of file WebSocket.cs.

◆ OnError

WebSocketErrorEventHandler HybridWebSocket.IWebSocket.OnError

Occurs when an error was reported from WebSocket.

Definition at line 114 of file WebSocket.cs.

◆ OnMessage

WebSocketMessageEventHandler HybridWebSocket.IWebSocket.OnMessage

Occurs when a message is received.

Definition at line 109 of file WebSocket.cs.

◆ OnOpen

WebSocketOpenEventHandler HybridWebSocket.IWebSocket.OnOpen

Occurs when the connection is opened.

Definition at line 104 of file WebSocket.cs.


The documentation for this interface was generated from the following file: