Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for SocketTimeoutException (2.37 sec)

  1. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

    import java.io.Closeable
    import java.io.IOException
    import java.io.InputStreamReader
    import java.net.ConnectException
    import java.net.HttpURLConnection
    import java.net.ProtocolException
    import java.net.SocketTimeoutException
    import java.nio.charset.StandardCharsets
    import java.util.Arrays
    import java.util.concurrent.TimeUnit
    import java.util.concurrent.atomic.AtomicBoolean
    import javax.net.ssl.HttpsURLConnection
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/InterceptorTest.kt

            .url(server.url("/"))
            .post(data.toRequestBody("text/plain".toMediaType()))
            .build()
        val call = client.newCall(request1)
        assertFailsWith<SocketTimeoutException> {
          call.execute() // we want this call to throw a SocketTimeoutException
        }
      }
    
      @Test
      fun chainCanCancelCall() {
        val callRef = AtomicReference<Call>()
        val interceptor =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RetryTlsHandshake.kt

    fun retryTlsHandshake(e: IOException): Boolean {
      return when {
        // If there was a protocol problem, don't recover.
        e is ProtocolException -> false
    
        // If there was an interruption or timeout (SocketTimeoutException), don't recover.
        // For the socket connect timeout case we do not try the same host with a different
        // ConnectionSpec: we assume it is unreachable.
        e is InterruptedIOException -> false
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/RouteFailureTest.kt

    import assertk.assertions.isEmpty
    import assertk.assertions.isEqualTo
    import java.io.IOException
    import java.net.InetAddress
    import java.net.InetSocketAddress
    import java.net.Proxy
    import java.net.SocketTimeoutException
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.SocketPolicy.ResetStreamAtStart
    import mockwebserver3.junit5.internal.MockWebServerInstance
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

    import assertk.assertions.isGreaterThan
    import assertk.assertions.isLessThan
    import assertk.assertions.isTrue
    import java.io.EOFException
    import java.io.IOException
    import java.net.ProtocolException
    import java.net.SocketTimeoutException
    import java.util.Random
    import kotlin.test.assertFailsWith
    import okhttp3.FailingCall
    import okhttp3.Headers
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.Protocol
    import okhttp3.Request
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

    package okhttp3.internal
    
    import java.io.IOException
    import java.io.InterruptedIOException
    import java.net.InetSocketAddress
    import java.net.ServerSocket
    import java.net.Socket
    import java.net.SocketTimeoutException
    import java.nio.charset.Charset
    import java.util.Collections
    import java.util.Locale
    import java.util.TimeZone
    import java.util.concurrent.ThreadFactory
    import java.util.concurrent.TimeUnit
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

    import assertk.assertions.isNull
    import java.io.EOFException
    import java.io.IOException
    import java.io.InterruptedIOException
    import java.net.HttpURLConnection
    import java.net.ProtocolException
    import java.net.SocketTimeoutException
    import java.time.Duration
    import java.util.Arrays
    import java.util.Collections
    import java.util.Random
    import java.util.concurrent.CountDownLatch
    import java.util.concurrent.TimeUnit
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  8. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

    import java.net.ProtocolException
    import java.net.Proxy
    import java.net.ProxySelector
    import java.net.ServerSocket
    import java.net.Socket
    import java.net.SocketAddress
    import java.net.SocketException
    import java.net.SocketTimeoutException
    import java.net.URI
    import java.net.URLConnection
    import java.net.UnknownHostException
    import java.security.KeyStore
    import java.security.cert.CertificateException
    import java.security.cert.X509Certificate
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

    import java.net.HttpURLConnection.HTTP_SEE_OTHER
    import java.net.HttpURLConnection.HTTP_UNAUTHORIZED
    import java.net.HttpURLConnection.HTTP_UNAVAILABLE
    import java.net.ProtocolException
    import java.net.Proxy
    import java.net.SocketTimeoutException
    import java.security.cert.CertificateException
    import javax.net.ssl.SSLHandshakeException
    import javax.net.ssl.SSLPeerUnverifiedException
    import okhttp3.Interceptor
    import okhttp3.OkHttpClient
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
  10. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        }.also { expected ->
          when (expected) {
            is SocketTimeoutException, is SSLException -> {}
            else -> throw expected
          }
        }
    
        // The second call times out because it uses the same bad connection.
        val call2 = client.newCall(Request(server.url("/")))
        assertFailsWith<SocketTimeoutException> {
          call2.execute()
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
Back to top