|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface WebSocket
WebSocket Interface.
This interface provides the signature for a server-side end point of a websocket connection. The Interface has several nested interfaces, for each type of message that may be received.
| 嵌套类摘要 | |
|---|---|
static interface |
WebSocket.Connection
A Connection interface is passed to a WebSocket instance via the onOpen(Connection) to
give the application access to the specifics of the current connection. |
static interface |
WebSocket.FrameConnection
Frame Level Connection The Connection interface at the level of sending/receiving frames rather than messages. |
static interface |
WebSocket.OnBinaryMessage
A nested WebSocket interface for receiving binary messages |
static interface |
WebSocket.OnControl
A nested WebSocket interface for receiving control messages |
static interface |
WebSocket.OnFrame
A nested WebSocket interface for receiving any websocket frame |
static interface |
WebSocket.OnTextMessage
A nested WebSocket interface for receiving text messages |
| 方法摘要 | |
|---|---|
void |
onClose(int closeCode,
String message)
Called when an established websocket connection closes |
void |
onOpen(WebSocket.Connection connection)
Called when a new websocket connection is accepted. |
| 方法详细信息 |
|---|
void onOpen(WebSocket.Connection connection)
connection - The Connection object to use to send messages.
void onClose(int closeCode,
String message)
closeCode - message -
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||