@@ -272,8 +272,7 @@ The [OkHttpClient instance](https://square.github.io/okhttp/4.x/okhttp/okhttp3/-
|
|||||||
|
|
||||||
```java
|
```java
|
||||||
OkHttpClient okHttpClient = new OkHttpClient.Builder()
|
OkHttpClient okHttpClient = new OkHttpClient.Builder()
|
||||||
.readTimeout(1000, TimeUnit.MILLISECONDS)
|
.readTimeout(1, TimeUnit.MINUTES) // important for HTTP long-polling
|
||||||
.writeTimeout(1000, TimeUnit.MILLISECONDS)
|
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
IO.Options options = new IO.Options();
|
IO.Options options = new IO.Options();
|
||||||
@@ -421,6 +420,7 @@ sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
|
|||||||
OkHttpClient okHttpClient = new OkHttpClient.Builder()
|
OkHttpClient okHttpClient = new OkHttpClient.Builder()
|
||||||
.hostnameVerifier(hostnameVerifier)
|
.hostnameVerifier(hostnameVerifier)
|
||||||
.sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) tmf.getTrustManagers()[0])
|
.sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) tmf.getTrustManagers()[0])
|
||||||
|
.readTimeout(1, TimeUnit.MINUTES) // important for HTTP long-polling
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
IO.Options options = new IO.Options();
|
IO.Options options = new IO.Options();
|
||||||
@@ -466,6 +466,7 @@ sslContext.init(null, new TrustManager[] { trustManager }, null);
|
|||||||
OkHttpClient okHttpClient = new OkHttpClient.Builder()
|
OkHttpClient okHttpClient = new OkHttpClient.Builder()
|
||||||
.hostnameVerifier(hostnameVerifier)
|
.hostnameVerifier(hostnameVerifier)
|
||||||
.sslSocketFactory(sslContext.getSocketFactory(), trustManager)
|
.sslSocketFactory(sslContext.getSocketFactory(), trustManager)
|
||||||
|
.readTimeout(1, TimeUnit.MINUTES) // important for HTTP long-polling
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
IO.Options options = new IO.Options();
|
IO.Options options = new IO.Options();
|
||||||
|
|||||||
Reference in New Issue
Block a user