public interface WebSocketServerListener
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onBinaryMessage(byte[] data,
WebSocketSession webSocketSession)
收到二进制消息时
|
void |
onClose(WebSocketSession webSocketSession)
关闭连接时
|
void |
onError(Exception e,
WebSocketSession webSocketSession)
发生异常时
|
void |
onOpen(WebSocketSession webSocketSession)
创建连接时
|
void |
onTextMessage(String text,
WebSocketSession webSocketSession)
收到文本消息时
|
void onOpen(WebSocketSession webSocketSession) throws IOException
IOExceptionvoid onTextMessage(String text, WebSocketSession webSocketSession) throws IOException
IOExceptionvoid onBinaryMessage(byte[] data,
WebSocketSession webSocketSession)
throws IOException
IOExceptionvoid onClose(WebSocketSession webSocketSession) throws IOException
IOExceptionvoid onError(Exception e, WebSocketSession webSocketSession) throws IOException
IOExceptionCopyright © 2022. All rights reserved.