public interface WebSocket
Client.
Upon normal operation each web socket progresses through a sequence of states:
Web sockets may fail due to HTTP upgrade problems, connectivity problems, or if either peer chooses to short-circuit the graceful shutdown process:
Note that the state progression is independent for each peer. Arriving at a gracefully-closed state indicates that a peer has sent all of its outgoing messages and received all of its incoming messages. But it does not guarantee that the other peer will successfully receive all of its incoming messages.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
WebSocket.Factory |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
boolean |
close(int code,
String reason) |
long |
queueSize() |
Request |
request() |
boolean |
send(ByteString bytes) |
boolean |
send(String text) |
Request request()
long queueSize()
boolean send(String text)
boolean send(ByteString bytes)
boolean close(int code,
String reason)
void cancel()
Copyright © 2019. All rights reserved.