public interface WebSocket extends Cancelable
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
WebSocket.Close |
static interface |
WebSocket.Listener<T> |
static interface |
WebSocket.Message
WebSocket 消息
|
long queueSize()
WebSocket.queueSize(),返回排序消息的字节数
否则:
返回排队消息的数量boolean send(java.lang.Object object)
object - 待发送的对象,可以是 String | ByteString | byte[] | Java Beanvoid close(int code,
java.lang.String reason)
WebSocket.close(int, String)code - Status code as defined by Section 7.4 of RFC 6455reason - Reason for shutting down or null.void msgType(java.lang.String type)
type - 消息类型,如 json、xml、protobuf 等Copyright © 2020 江苏一键联信息科技有限公司. All Rights Reserved.