Tanoda
|
Public Member Functions | |
WebSocket (string url) | |
WebSocket constructor. More... | |
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... | |
void | Send (string data) |
Send text data over the socket. More... | |
bool | Ping () |
Trys to ping the host. More... | |
WebSocketState | GetState () |
Return WebSocket connection state. More... | |
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... | |
Protected Attributes | |
WebSocketSharp.WebSocket | ws |
The WebSocketSharp instance. 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... | |
![]() | |
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... | |
Definition at line 443 of file WebSocket.cs.
HybridWebSocket.WebSocket.WebSocket | ( | string | url | ) |
WebSocket constructor.
url | Valid WebSocket URL. |
Definition at line 475 of file WebSocket.cs.
void HybridWebSocket.WebSocket.Close | ( | WebSocketCloseCode | code = WebSocketCloseCode.Normal , |
string | reason = null |
||
) |
Close WebSocket connection with optional status code and reason.
code | Close status code. |
reason | Reason string. |
Implements HybridWebSocket.IWebSocket.
Definition at line 555 of file WebSocket.cs.
void HybridWebSocket.WebSocket.Connect | ( | ) |
Open WebSocket connection
Implements HybridWebSocket.IWebSocket.
Definition at line 532 of file WebSocket.cs.
WebSocketState HybridWebSocket.WebSocket.GetState | ( | ) |
Return WebSocket connection state.
Implements HybridWebSocket.IWebSocket.
Definition at line 644 of file WebSocket.cs.
bool HybridWebSocket.WebSocket.Ping | ( | ) |
Trys to ping the host.
Definition at line 623 of file WebSocket.cs.
void HybridWebSocket.WebSocket.Send | ( | byte[] | data | ) |
Send binary data over the socket.
data | Payload data. |
Implements HybridWebSocket.IWebSocket.
Definition at line 580 of file WebSocket.cs.
void HybridWebSocket.WebSocket.Send | ( | string | data | ) |
Send text data over the socket.
data | Payload text. |
Definition at line 602 of file WebSocket.cs.
|
protected |
The WebSocketSharp instance.
Definition at line 469 of file WebSocket.cs.
WebSocketCloseEventHandler HybridWebSocket.WebSocket.OnClose |
Occurs when the socked was closed.
Definition at line 464 of file WebSocket.cs.
WebSocketErrorEventHandler HybridWebSocket.WebSocket.OnError |
Occurs when an error was reported from WebSocket.
Definition at line 459 of file WebSocket.cs.
WebSocketMessageEventHandler HybridWebSocket.WebSocket.OnMessage |
Occurs when a message is received.
Definition at line 454 of file WebSocket.cs.
WebSocketOpenEventHandler HybridWebSocket.WebSocket.OnOpen |
Occurs when the connection is opened.
Definition at line 449 of file WebSocket.cs.