• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

src/main/java/com/squareup/okhttp/22-Nov-2023-1,220746

README.mdD22-Nov-2023627 2317

pom.xmlD22-Nov-20231.1 KiB3832

README.md

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