Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 73 for addTest (0.16 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

        route: Route,
        routes: List<Route>? = null,
      ): ConnectPlan {
        if (route.address.sslSocketFactory == null) {
          if (ConnectionSpec.CLEARTEXT !in route.address.connectionSpecs) {
            throw UnknownServiceException("CLEARTEXT communication not enabled for client")
          }
    
          val host = route.address.url.host
          if (!Platform.get().isCleartextTrafficPermitted(host)) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/AddressTest.kt

      }
    
      @Test fun addressToString() {
        val address = factory.newAddress()
        assertThat(address.toString())
          .isEqualTo("Address{example.com:80, proxySelector=RecordingProxySelector}")
      }
    
      @Test fun addressWithProxyToString() {
        val address = factory.newAddress(proxy = Proxy.NO_PROXY)
        assertThat(address.toString())
          .isEqualTo("Address{example.com:80, proxy=${Proxy.NO_PROXY}}")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/SocksProxy.kt

            else -> throw ProtocolException("unsupported address type: $addressType")
          }
    
        val port = fromSource.readShort() and 0xffff
    
        when (command) {
          COMMAND_CONNECT -> {
            val toSocket = Socket(toAddress, port)
            val localAddress = toSocket.localAddress.address
            if (localAddress.size != 4) {
              throw ProtocolException("unexpected address: " + toSocket.localAddress)
            }
    
    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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

       * address for all hosts, regardless of the actual number of IP addresses reported by DNS.
       */
      fun newClient(): OkHttpClient {
        var client = testClient
        if (client == null) {
          client =
            initialClientBuilder()
              .dns(SINGLE_INET_ADDRESS_DNS) // Prevent unexpected fallback addresses.
    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)
Back to top