Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for getByAddress (0.34 sec)

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

    @Timeout(30)
    class RecordedRequestTest {
      private val headers: Headers = EMPTY_HEADERS
    
      @Test fun testIPv4() {
        val socket =
          FakeSocket(
            localAddress = InetAddress.getByAddress("127.0.0.1", byteArrayOf(127, 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/FakeDns.kt

      fun allocate(count: Int): List<InetAddress> {
        val from = nextAddress
        nextAddress += count
        return (from until nextAddress)
          .map {
            return@map InetAddress.getByAddress(
              Buffer().writeInt(it.toInt()).readByteArray(),
            )
          }
      }
    
      /** Allocates and returns `count` fake IPv6 addresses like [::ff00:64, ::ff00:65].  */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/RouteFailureTest.kt

        // Define two host names for the DNS routing of fake proxy servers
        val proxyServer1 = InetAddress.getByAddress("proxyServer1", byteArrayOf(127, 0, 0, 2))
        val proxyServer2 = InetAddress.getByAddress("proxyServer2", byteArrayOf(127, 0, 0, 3))
    
        println("Proxy Server 1 is ${server1.inetSocketAddress}")
        println("Proxy Server 2 is ${server2.inetSocketAddress}")
    
    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)
  4. okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt

        assertThat(socketAddress.socketHost).isEqualTo("127.0.0.1")
        socketAddress = InetSocketAddress(InetAddress.getByAddress(byteArrayOf(127, 0, 0, 1)), 1234)
        assertThat(socketAddress.socketHost).isEqualTo("127.0.0.1")
        socketAddress =
          InetSocketAddress(
            InetAddress.getByAddress("foobar", byteArrayOf(127, 0, 0, 1)),
            1234,
          )
        assertThat(socketAddress.socketHost).isEqualTo("127.0.0.1")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 20.8K bytes
    - Viewed (0)
  5. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

          val length = buf.readShort().toInt() and 0xffff
    
          if (type == TYPE_A || type == TYPE_AAAA) {
            val bytes = ByteArray(length)
            buf.read(bytes)
            result.add(InetAddress.getByAddress(bytes))
          } else {
            buf.skip(length.toLong())
          }
        }
    
        return result
      }
    
      @Throws(EOFException::class)
      private fun skipName(source: Buffer) {
        // 0 - 63 bytes
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/SocksProxy.kt

        val addressType = fromSource.readByte() and 0xff
        val toAddress =
          when (addressType) {
            ADDRESS_TYPE_IPV4 -> {
              InetAddress.getByAddress(fromSource.readByteArray(4L))
            }
    
            ADDRESS_TYPE_DOMAIN_NAME -> {
              val domainNameLength: Int = fromSource.readByte() and 0xff
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

            .build()
        assert200Http2Response(execute(url), server.hostName)
        val sanUrl = url.newBuilder().host("san.com").build()
        dns["san.com"] =
          Arrays.asList(
            InetAddress.getByAddress("san.com", byteArrayOf(0, 0, 0, 0)),
            serverIps[0],
          )
        assert200Http2Response(execute(sanUrl), "san.com")
        assertThat(client.connectionPool.connectionCount()).isEqualTo(1)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 18.7K bytes
    - Viewed (0)
Back to top