-
嵌套类概要
嵌套类
static class
static interface
static interface
-
字段概要
字段
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
方法概要
void
同 WebSocket.close(int, String)
void
long
boolean
int
-
字段详细资料
-
STATUS_CANCELED
static final int STATUS_CANCELED
- 另请参阅:
-
-
STATUS_CONNECTING
static final int STATUS_CONNECTING
- 另请参阅:
-
-
STATUS_CONNECTED
static final int STATUS_CONNECTED
- 另请参阅:
-
-
STATUS_DISCONNECTED
static final int STATUS_DISCONNECTED
- 另请参阅:
-
-
STATUS_NETWORK_ERROR
static final int STATUS_NETWORK_ERROR
- 另请参阅:
-
-
STATUS_TIMEOUT
static final int STATUS_TIMEOUT
- 另请参阅:
-
-
STATUS_EXCEPTION
static final int STATUS_EXCEPTION
- 另请参阅:
-
-
方法详细资料
-
queueSize
long queueSize()
- 返回:
- 若连接已打开,则:
同
WebSocket.queueSize(),返回排序消息的字节数
否则:
返回排队消息的数量
-
send
- 参数:
object - 待发送的对象,可以是 String | ByteString | byte[] | Java Bean
- 返回:
- 如果连接已断开 返回 false
-
close
void close(int code,
String reason)
同 WebSocket.close(int, String)
- 参数:
code - Status code as defined by Section 7.4 of RFC 6455
reason - Reason for shutting down or null.
-
msgType
设置消息类型
- 参数:
type - 消息类型,如 json、xml、protobuf 等
-
status
int status()
WebSocket 当前的连接状态
- 返回:
- 连接状态标识
- 从以下版本开始:
- v2.4.5
- 另请参阅:
-