Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 100 for system (0.15 sec)

  1. okhttp/src/main/kotlin/okhttp3/Dns.kt

     */
    package okhttp3
    
    import java.net.InetAddress
    import java.net.UnknownHostException
    import okhttp3.Dns.Companion.SYSTEM
    
    /**
     * A domain name service that resolves IP addresses for host names. Most applications will use the
     * [system DNS service][SYSTEM], which is the default. Some applications may provide their own
     * implementation to use a different DNS server, to prefer IPv6 addresses, to prefer IPv4 addresses,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

      ) {
        logEvent(ConnectionEvent.ConnectEnd(System.nanoTime(), connection, route, call))
      }
    
      override fun connectionClosed(connection: Connection) = logEvent(ConnectionEvent.ConnectionClosed(System.nanoTime(), connection))
    
      override fun connectionAcquired(
        connection: Connection,
        call: Call,
      ) {
        logEvent(ConnectionEvent.ConnectionAcquired(System.nanoTime(), connection, call))
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  3. docs/features/events.md

    class PrintingEventListener extends EventListener {
      private long callStartNanos;
    
      private void printEvent(String name) {
        long nowNanos = System.nanoTime();
        if (name.equals("callStart")) {
          callStartNanos = nowNanos;
        }
        long elapsedNanos = nowNanos - callStartNanos;
        System.out.printf("%.3f %s%n", elapsedNanos / 1000000000d, name);
      }
    
      @Override public void callStart(Call call) {
        printEvent("callStart");
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/RequestBodyTest.kt

          closedRequestBody.writeTo(Buffer())
        }
      }
    
      @Test
      fun testPathRead() {
        assertOnPath(content = "Hello") { path ->
          val requestBody = path.asRequestBody(FileSystem.SYSTEM)
    
          val buffer = Buffer()
          requestBody.writeTo(buffer)
          assertThat(buffer.readUtf8()).isEqualTo("Hello")
        }
      }
    
      private inline fun <T> assertOnFileDescriptor(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (1)
  5. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

        platform.assumeNotConscrypt()
    
        val handshakeCertificates = localhost()
        server.useHttps(handshakeCertificates.sslSocketFactory())
    
        val dns =
          Dns {
            Dns.SYSTEM.lookup(server.hostName)
          }
    
        val client =
          clientTestRule.newClientBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (1)
  6. okhttp/src/test/java/okhttp3/internal/DoubleInetAddressDns.kt

     * fallbacks to guarantee that a fallback address is available.
     */
    class DoubleInetAddressDns : Dns {
      override fun lookup(hostname: String): List<InetAddress> {
        val addresses = Dns.SYSTEM.lookup(hostname)
        return listOf(addresses[0], addresses[0])
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Dec 23 10:26:25 GMT 2023
    - 1K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/ConfigureTimeouts.java

        Request request = new Request.Builder()
            .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay.
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          System.out.println("Response completed: " + response);
        }
      }
    
      public static void main(String... args) throws Exception {
        new ConfigureTimeouts().run();
      }
    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. samples/guide/src/main/java/okhttp3/recipes/PostFile.java

            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
      }
    
      public static void main(String... args) throws Exception {
        new PostFile().run();
      }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat May 25 18:02:55 GMT 2019
    - 1.5K bytes
    - Viewed (0)
  9. regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java

          assertEquals(Protocol.HTTP_2, response.protocol());
    
          for (Certificate c: response.handshake().peerCertificates()) {
            X509Certificate x = (X509Certificate) c;
            System.out.println(x.getSubjectDN());
          }
        }
      }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jul 26 06:37:08 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

            .build();
    
        Call call = client.newCall(new Request.Builder()
            .url(server.url("/"))
            .build());
        Response response = call.execute();
        System.out.println(response.handshake().tlsVersion());
      }
    
      public static void main(String... args) throws Exception {
        new HttpsServer().run();
      }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 02 14:04:37 GMT 2023
    - 2.1K bytes
    - Viewed (0)
Back to top