Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 82 for address (0.15 sec)

  1. mockwebserver/src/test/java/mockwebserver3/RecordedRequestTest.kt

      }
    
      @Test fun testHostname() {
        val headers = headersOf("Host", "host-from-header.com")
        val socket =
          FakeSocket(
            localAddress =
              InetAddress.getByAddress(
                "host-from-address.com",
                byteArrayOf(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1),
              ),
            localPort = 80,
          )
        val request = RecordedRequest("GET / HTTP/1.1", headers, emptyList(), 0, Buffer(), 0, socket)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/SpecificHostSocketFactory.kt

    /**
     * A [SocketFactory] that redirects connections to [defaultAddress] or specific overridden address via [set].
     */
    class SpecificHostSocketFactory(
      val defaultAddress: InetSocketAddress?,
    ) : DelegatingSocketFactory(getDefault()) {
      private val hostMapping = mutableMapOf<InetAddress, InetSocketAddress>()
    
      /** Sets the [real] address for [requested].  */
      operator fun set(
        requested: InetAddress,
        real: InetSocketAddress,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FakeRoutePlanner.kt

        return deferredPlans.isNotEmpty() || nextPlanIndex < plans.size || autoGeneratePlans
      }
    
      override fun sameHostAndPort(url: HttpUrl): Boolean {
        return url.host == address.url.host && url.port == address.url.port
      }
    
      override fun close() {
        factory.close()
      }
    
      inner class FakePlan(
        val id: Int,
      ) : RoutePlanner.Plan {
        var planningThrowable: Throwable? = null
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

    ): Boolean =
      try {
        this.skipAll(timeout, timeUnit)
      } catch (_: IOException) {
        false
      }
    
    internal fun Socket.peerName(): String {
      val address = remoteSocketAddress
      return if (address is InetSocketAddress) address.hostName else address.toString()
    }
    
    /**
     * Returns true if new reads and writes should be attempted on this.
     *
    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)
  5. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

      fun tearDown() {
        factory.close()
      }
    
      @Test
      fun address() {
        val address: Address = factory.newAddress()
        val url: HttpUrl = address.url
        val dns: Dns = address.dns
        val socketFactory: SocketFactory = address.socketFactory
        val proxyAuthenticator: Authenticator = address.proxyAuthenticator
        val protocols: List<Protocol> = address.protocols
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  6. okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt

              .build(),
          )
        val response = call.execute()
        assertThat(response.code).isEqualTo(200)
        response.body.close()
        val address = client.dns.lookup(server!!.hostName)[0]
        val expectedAddress = InetSocketAddress(address, server!!.port)
        val event = listener.removeUpToEvent(ConnectionEvent.ConnectStart::class.java)
        assertThat(event.route.socketAddress).isEqualTo(expectedAddress)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/RoutePlanner.kt

     *
     * Implementations of this interface are not thread-safe. Each instance is thread-confined to the
     * thread executing the call.
     */
    interface RoutePlanner {
      val address: Address
    
      /** Follow-ups for failed plans and plans that lost a race. */
      val deferredPlans: ArrayDeque<Plan>
    
      fun isCanceled(): Boolean
    
      /** Returns a plan to attempt. */
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  8. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/TunnelingUnixSocket.java

      TunnelingUnixSocket(File path, UnixSocketChannel channel) {
        super(channel);
        this.path = path;
      }
    
      TunnelingUnixSocket(File path, UnixSocketChannel channel, InetSocketAddress address) {
        this(path, channel);
        this.inetSocketAddress = address;
      }
    
      @Override public void connect(SocketAddress endpoint) throws IOException {
        this.inetSocketAddress = (InetSocketAddress) endpoint;
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Feb 12 16:33:52 GMT 2019
    - 1.9K bytes
    - Viewed (1)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

      companion object {
        /**
         * A network that resolves only one IP address per host. Use this when testing route selection
         * fallbacks to prevent the host machine's various IP addresses from interfering.
         */
        private val SINGLE_INET_ADDRESS_DNS =
          Dns { hostname ->
            val addresses = Dns.SYSTEM.lookup(hostname)
            listOf(addresses[0])
          }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java

        }
    
        @Override public Socket createSocket(
            InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
          return configureSocket((SSLSocket) delegate.createSocket(
              address, port, localAddress, localPort));
        }
    
        protected SSLSocket configureSocket(SSLSocket socket) throws IOException {
          return socket;
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Mar 14 21:57:42 GMT 2019
    - 6.5K bytes
    - Viewed (0)
Back to top