Searched refs:SocketPolicy (Results 1 – 18 of 18) sorted by relevance
19 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()
49 private SocketPolicy socketPolicy = SocketPolicy.KEEP_OPEN;222 public SocketPolicy getSocketPolicy() { in getSocketPolicy()226 public MockResponse setSocketPolicy(SocketPolicy socketPolicy) { in setSocketPolicy()
22 public enum SocketPolicy { enum
36 return new MockResponse().setSocketPolicy(SocketPolicy.KEEP_OPEN); in peek()
40 private SocketPolicy socketPolicy = SocketPolicy.KEEP_OPEN;188 public SocketPolicy getSocketPolicy() { in getSocketPolicy()192 public MockResponse setSocketPolicy(SocketPolicy socketPolicy) { in setSocketPolicy()
84 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 …]
20 public enum SocketPolicy { enum
34 return new MockResponse().setSocketPolicy(SocketPolicy.KEEP_OPEN); in peek()
27 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()
21 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()
30 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 …]
30 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 …]
60 import static com.squareup.okhttp.mockwebserver.SocketPolicy.DISCONNECT_AT_END;
184 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_AT_START)); in disconnectAtStart()259 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_DURING_REQUEST_BODY)); in disconnectRequestHalfway()289 .setSocketPolicy(SocketPolicy.DISCONNECT_DURING_RESPONSE_BODY)); in disconnectResponseHalfway()
214 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_AT_START)); in testDisconnectAtStart()
30 import com.squareup.okhttp.mockwebserver.SocketPolicy;260 server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.NO_RESPONSE)); in readResponseHeaderTimeout()
64 import static com.squareup.okhttp.mockwebserver.SocketPolicy.DISCONNECT_AT_END;
80 import static com.squareup.okhttp.mockwebserver.SocketPolicy.DISCONNECT_AT_END;