• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1OkHttp Web Sockets
2==================
3
4RFC6455-compliant web socket implementation.
5
6Create a `WebSocketCall` with a `Request` and an `OkHttpClient` instance.
7```java
8WebSocketCall call = WebSocketCall.create(client, request);
9```
10
11A `WebSocketListener` will notify of the initial connection, server-sent messages, and any failures
12on the connection.
13
14Start the web socket by calling `enqueue` on `WebSocketCall` with the `WebSocketListener`.
15```java
16call.enqueue(new WebSocketListener() {
17  // ...
18});
19```
20
21*Note: This module's API should be considered experimental and may be subject to breaking changes
22in future releases.*
23