Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for connectTimeout (0.26 sec)

  1. okcurl/src/main/kotlin/okhttp3/curl/Main.kt

      fun createClient(): Call.Factory {
        val builder = OkHttpClient.Builder()
        builder.followSslRedirects(followRedirects)
        if (connectTimeout != DEFAULT_TIMEOUT) {
          builder.connectTimeout(connectTimeout.toLong(), SECONDS)
        }
        if (readTimeout != DEFAULT_TIMEOUT) {
          builder.readTimeout(readTimeout.toLong(), SECONDS)
        }
        if (callTimeout != DEFAULT_TIMEOUT) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (1)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/ConfigureTimeouts.kt

    package okhttp3.recipes.kt
    
    import java.util.concurrent.TimeUnit
    import okhttp3.OkHttpClient
    import okhttp3.Request
    
    class ConfigureTimeouts {
      private val client: OkHttpClient =
        OkHttpClient.Builder()
          .connectTimeout(5, TimeUnit.SECONDS)
          .writeTimeout(5, TimeUnit.SECONDS)
          .readTimeout(5, TimeUnit.SECONDS)
          .callTimeout(10, TimeUnit.SECONDS)
          .build()
    
      fun run() {
        val request =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  3. maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java

                            }
                        }
                    }
    
                    PlexusConfiguration connectTimeoutXml = config.getChild("connectTimeout", false);
                    if (connectTimeoutXml != null) {
                        connectTimeout = Integer.parseInt(connectTimeoutXml.getValue());
                    } else {
                        // fallback configuration name
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Thu Apr 25 14:13:36 GMT 2024
    - 27.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/platform/AndroidPlatform.kt

        ).filter { it.isSupported() }
    
      @Throws(IOException::class)
      override fun connectSocket(
        socket: Socket,
        address: InetSocketAddress,
        connectTimeout: Int,
      ) {
        try {
          socket.connect(address, connectTimeout)
        } catch (e: ClassCastException) {
          // On android 8.0, socket.connect throws a ClassCastException due to a bug
          // see https://issuetracker.google.com/issues/63649622
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. istioctl/pkg/kubeinject/testdata/istio-operator.yaml

    spec:
      meshConfig:
        # Set enableTracing to false to disable request tracing.
        enableTracing: true
        # This is the ingress service name, update if you used a different name
        ingressService: istio-ingress
        connectTimeout: 1s
        defaultConfig:
          ### ADVANCED SETTINGS #############
          # Where should envoy's configuration be stored in the istio-proxy container
          configPath: "/etc/istio/proxy"
    Others
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 689 bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

      @Test fun timeoutValidRange() {
        val builder = OkHttpClient.Builder()
        try {
          builder.callTimeout(Duration.ofNanos(1))
        } catch (ignored: IllegalArgumentException) {
        }
        try {
          builder.connectTimeout(Duration.ofNanos(1))
        } catch (ignored: IllegalArgumentException) {
        }
        try {
          builder.writeTimeout(Duration.ofNanos(1))
        } catch (ignored: IllegalArgumentException) {
        }
        try {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/ConfigureTimeouts.java

    import okhttp3.Response;
    
    public final class ConfigureTimeouts {
      private final OkHttpClient client;
    
      public ConfigureTimeouts() throws Exception {
        client = new OkHttpClient.Builder()
            .connectTimeout(5, TimeUnit.SECONDS)
            .writeTimeout(5, TimeUnit.SECONDS)
            .readTimeout(5, TimeUnit.SECONDS)
            .callTimeout(10, TimeUnit.SECONDS)
            .build();
      }
    
      public void run() throws Exception {
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Sep 28 18:00:26 GMT 2019
    - 1.5K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

         *
         * The connect timeout is applied when connecting a TCP socket to the target host. The default
         * value is 10 seconds.
         */
        fun connectTimeout(
          timeout: Long,
          unit: TimeUnit,
        ) = apply {
          connectTimeout = checkDuration("timeout", timeout, unit)
        }
    
        /**
         * Sets the default connect timeout for new connections. A value of 0 means no timeout,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

      }
    
      @Throws(IOException::class)
      open fun connectSocket(
        socket: Socket,
        address: InetSocketAddress,
        connectTimeout: Int,
      ) {
        socket.connect(address, connectTimeout)
      }
    
      open fun log(
        message: String,
        level: Int = INFO,
        t: Throwable? = null,
      ) {
        val logLevel = if (level == WARN) Level.WARNING else Level.INFO
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  10. istioctl/pkg/kubeinject/testdata/mesh-config.yaml

    defaultConfig:
      # NOTE: If you change any values in this section, make sure to make
      # the same changes in start up args in istio-ingress pods.
      #
      # TCP connection timeout between Envoy & the application, and between Envoys.
      connectTimeout: 1s
      #
      ### ADVANCED SETTINGS #############
      # Where should envoy's configuration be stored in the istio-proxy container
      configPath: "/etc/istio/proxy"
      binaryPath: "/usr/local/bin/envoy"
    Others
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 2.2K bytes
    - Viewed (0)
Back to top