Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for getByAddress (0.25 sec)

  1. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  2. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K 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 Apr 26 11:42:10 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 Apr 26 11:42:10 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 Apr 26 11:42:10 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/net/InetAddresses.java

        try {
          return InetAddress.getByAddress(targetCopyArray);
        } catch (UnknownHostException impossible) {
          throw new AssertionError(impossible);
        }
      }
    
      /**
       * Returns an address from a <b>little-endian ordered</b> byte array (the opposite of what {@link
       * InetAddress#getByAddress} expects).
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 44K bytes
    - Viewed (1)
  8. src/main/java/jcifs/pac/kerberos/KerberosEncData.java

                            InetAddress userAddress = null;
                            try {
                                userAddress = InetAddress.getByAddress(addressOctets.getOctets());
                            }
                            catch ( UnknownHostException e ) {}
                            this.userAddresses.add(userAddress);
                        }
                    }
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Mon Oct 02 12:02:06 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/net/InetAddressesTest.java

        assertEquals(
            InetAddresses.fromLittleEndianByteArray(new byte[] {1, 2, 3, 4}),
            InetAddress.getByAddress(new byte[] {4, 3, 2, 1}));
    
        assertEquals(
            InetAddresses.fromLittleEndianByteArray(
                new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}),
            InetAddress.getByAddress(
                new byte[] {16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}));
    
        assertThrows(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 31.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/net/InetAddressesTest.java

        assertEquals(
            InetAddresses.fromLittleEndianByteArray(new byte[] {1, 2, 3, 4}),
            InetAddress.getByAddress(new byte[] {4, 3, 2, 1}));
    
        assertEquals(
            InetAddresses.fromLittleEndianByteArray(
                new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}),
            InetAddress.getByAddress(
                new byte[] {16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}));
    
        assertThrows(
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 31.9K bytes
    - Viewed (0)
Back to top