Home
last modified time | relevance | path

Searched refs:SocketPolicy (Results 1 – 18 of 18) sorted by relevance

/external/mockwebserver/src/main/java/com/google/mockwebserver/
DMockWebServer.java19 import static com.google.mockwebserver.SocketPolicy.DISCONNECT_AT_START;
20 import static com.google.mockwebserver.SocketPolicy.FAIL_HANDSHAKE;
269 SocketPolicy socketPolicy = dispatcher.peek().getSocketPolicy(); in play()
307 SocketPolicy socketPolicy = dispatcher.peek().getSocketPolicy(); in serveConnection()
348 SocketPolicy socketPolicy = dispatcher.peek().getSocketPolicy(); in serveConnection()
352 if (socketPolicy == SocketPolicy.UPGRADE_TO_SSL_AT_END) return; in serveConnection()
369 if (response.getSocketPolicy() == SocketPolicy.DISCONNECT_AFTER_READING_REQUEST) { in serveConnection()
391 if (response.getSocketPolicy() == SocketPolicy.DISCONNECT_AT_END) { in serveConnection()
394 } else if (response.getSocketPolicy() == SocketPolicy.SHUTDOWN_INPUT_AT_END) { in serveConnection()
396 } else if (response.getSocketPolicy() == SocketPolicy.SHUTDOWN_OUTPUT_AT_END) { in serveConnection()
DMockResponse.java49 private SocketPolicy socketPolicy = SocketPolicy.KEEP_OPEN;
222 public SocketPolicy getSocketPolicy() { in getSocketPolicy()
226 public MockResponse setSocketPolicy(SocketPolicy socketPolicy) { in setSocketPolicy()
DSocketPolicy.java22 public enum SocketPolicy { enum
DDispatcher.java36 return new MockResponse().setSocketPolicy(SocketPolicy.KEEP_OPEN); in peek()
/external/okhttp/mockwebserver/src/main/java/com/squareup/okhttp/mockwebserver/
DMockResponse.java40 private SocketPolicy socketPolicy = SocketPolicy.KEEP_OPEN;
188 public SocketPolicy getSocketPolicy() { in getSocketPolicy()
192 public MockResponse setSocketPolicy(SocketPolicy socketPolicy) { in setSocketPolicy()
DMockWebServer.java84 import static com.squareup.okhttp.mockwebserver.SocketPolicy.DISCONNECT_AT_START;
85 import static com.squareup.okhttp.mockwebserver.SocketPolicy.DISCONNECT_DURING_REQUEST_BODY;
86 import static com.squareup.okhttp.mockwebserver.SocketPolicy.DISCONNECT_DURING_RESPONSE_BODY;
87 import static com.squareup.okhttp.mockwebserver.SocketPolicy.FAIL_HANDSHAKE;
388 SocketPolicy socketPolicy = dispatcher.peek().getSocketPolicy();
441 SocketPolicy socketPolicy = dispatcher.peek().getSocketPolicy();
507 SocketPolicy socketPolicy = dispatcher.peek().getSocketPolicy();
511 if (socketPolicy == SocketPolicy.UPGRADE_TO_SSL_AT_END) return;
528 if (response.getSocketPolicy() == SocketPolicy.DISCONNECT_AFTER_REQUEST) {
532 if (response.getSocketPolicy() == SocketPolicy.NO_RESPONSE) {
[all …]
DDispatcher.java34 return new MockResponse().setSocketPolicy(SocketPolicy.KEEP_OPEN); in peek()
DSocketPolicy.java20 public enum SocketPolicy { enum
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/tls/
DCertificatePinnerChainValidationTest.java27 import com.squareup.okhttp.mockwebserver.SocketPolicy;
79 .setSocketPolicy(SocketPolicy.DISCONNECT_AT_END)); in pinRootNotPresentInChain()
89 .setSocketPolicy(SocketPolicy.DISCONNECT_AT_END)); in pinRootNotPresentInChain()
134 .setSocketPolicy(SocketPolicy.DISCONNECT_AT_END)); in pinIntermediatePresentInChain()
144 .setSocketPolicy(SocketPolicy.DISCONNECT_AT_END)); in pinIntermediatePresentInChain()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DConnectionReuseTest.java21 import com.squareup.okhttp.mockwebserver.SocketPolicy;
93 .setSocketPolicy(SocketPolicy.DISCONNECT_AT_END) in connectionsAreNotReusedWithUnknownLengthResponseBody()
151 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_AFTER_REQUEST)); in silentRetryWhenIdempotentRequestFailsOnReusedConnection()
170 .setSocketPolicy(SocketPolicy.SHUTDOWN_OUTPUT_AT_END)); in staleConnectionNotReusedForNonIdempotentRequest()
DCallTest.java30 import com.squareup.okhttp.mockwebserver.SocketPolicy;
761 .setSocketPolicy(SocketPolicy.NO_RESPONSE)); in timeoutsNotRetried()
883 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_AFTER_REQUEST)); in recoverWhenRetryOnConnectionFailureIsTrue()
896 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_AFTER_REQUEST)); in noRecoverWhenRetryOnConnectionFailureIsFalse()
914 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.FAIL_HANDSHAKE)); in recoverFromTlsHandshakeFailure()
935 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.FAIL_HANDSHAKE)); in recoverFromTlsHandshakeFailure_tlsFallbackScsvEnabled()
959 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.FAIL_HANDSHAKE)); in recoverFromTlsHandshakeFailure_Async()
977 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.FAIL_HANDSHAKE)); in noRecoveryFromTlsHandshakeFailureWhenTlsFallbackIsDisabled()
1086 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_AFTER_REQUEST)); in postBodyRetransmittedOnFailureRecovery()
2036 .setSocketPolicy(SocketPolicy.UPGRADE_TO_SSL_AT_END) in proxyConnectOmitsApplicationHeaders()
[all …]
DURLConnectionTest.java30 import com.squareup.okhttp.mockwebserver.SocketPolicy;
89 import static com.squareup.okhttp.mockwebserver.SocketPolicy.DISCONNECT_AT_END;
90 import static com.squareup.okhttp.mockwebserver.SocketPolicy.DISCONNECT_AT_START;
91 import static com.squareup.okhttp.mockwebserver.SocketPolicy.SHUTDOWN_INPUT_AT_END;
92 import static com.squareup.okhttp.mockwebserver.SocketPolicy.SHUTDOWN_OUTPUT_AT_END;
411 private void testServerClosesOutput(SocketPolicy socketPolicy) throws Exception { in testServerClosesOutput()
599 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.FAIL_HANDSHAKE)); in connectViaHttpsWithSSLFallback()
615 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.FAIL_HANDSHAKE)); in connectViaHttpsWithSSLFallbackFailuresRecorded()
616 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.FAIL_HANDSHAKE)); in connectViaHttpsWithSSLFallbackFailuresRecorded()
642 .setSocketPolicy(SocketPolicy.DISCONNECT_AT_END)); in sslFallbackNotUsedWhenRecycledConnectionFails()
[all …]
DCacheTest.java60 import static com.squareup.okhttp.mockwebserver.SocketPolicy.DISCONNECT_AT_END;
/external/okhttp/mockwebserver/src/test/java/com/squareup/okhttp/mockwebserver/
DMockWebServerTest.java183 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_AT_START)); in disconnectAtStart()
258 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_DURING_REQUEST_BODY)); in disconnectRequestHalfway()
286 .setSocketPolicy(SocketPolicy.DISCONNECT_DURING_RESPONSE_BODY)); in disconnectResponseHalfway()
/external/mockwebserver/src/test/java/com/google/mockwebserver/
DMockWebServerTest.java214 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_AT_START)); in testDisconnectAtStart()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/framed/
DHttpOverSpdyTest.java30 import com.squareup.okhttp.mockwebserver.SocketPolicy;
260 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.NO_RESPONSE)); in readResponseHeaderTimeout()
/external/okhttp/okhttp-urlconnection/src/test/java/com/squareup/okhttp/
DUrlConnectionCacheTest.java64 import static com.squareup.okhttp.mockwebserver.SocketPolicy.DISCONNECT_AT_END;
/external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/internal/huc/
DResponseCacheTest.java80 import static com.squareup.okhttp.mockwebserver.SocketPolicy.DISCONNECT_AT_END;