Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for clear (0.13 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt

      operator fun set(
        hostname: String,
        addresses: List<InetAddress>,
      ): FakeDns {
        hostAddresses[hostname] = addresses
        return this
      }
    
      /** Clears the results for `hostname`.  */
      fun clear(hostname: String): FakeDns {
        hostAddresses.remove(hostname)
        return this
      }
    
      @Throws(UnknownHostException::class)
      fun lookup(
        hostname: String,
        index: Int,
    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)
  2. mockwebserver-junit5/src/main/kotlin/mockwebserver3/junit5/internal/MockWebServerExtension.kt

          started = true
          for (server in servers.values) {
            server.start()
          }
        }
    
        fun shutdownAll() {
          try {
            val toClear = servers.values.toList()
            servers.clear()
            for (server in toClear) {
              server.shutdown()
            }
          } catch (e: IOException) {
            logger.log(Level.WARNING, "MockWebServer shutdown failed", e)
          }
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 11 12:12:36 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

                byteBuffer: ByteBuffer,
              ) {
                println("onReadCompleted ${info.headers.asMap}")
                byteBuffer.flip()
                buffer.write(byteBuffer)
                byteBuffer.clear()
                request.read(byteBuffer)
              }
    
              override fun onSucceeded(
                request: UrlRequest,
                info: UrlResponseInfo,
              ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 24 13:19:43 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

        for (plan in tcpConnectsInFlight) {
          plan.cancel()
          val retry = plan.retry() ?: continue
          routePlanner.deferredPlans.addLast(retry)
        }
        tcpConnectsInFlight.clear()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Settings.kt

        }
    
      val initialWindowSize: Int
        get() {
          val bit = 1 shl INITIAL_WINDOW_SIZE
          return if (bit and set != 0) values[INITIAL_WINDOW_SIZE] else DEFAULT_INITIAL_WINDOW_SIZE
        }
    
      fun clear() {
        set = 0
        values.fill(0)
      }
    
      operator fun set(
        id: Int,
        value: Int,
      ): Settings {
        if (id < 0 || id >= values.size) {
          return this // Discard unknown settings.
        }
    
    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/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

            break
          }
        }
    
        if (routes.isEmpty()) {
          // We've exhausted all Proxies so fallback to the postponed routes.
          routes += postponedRoutes
          postponedRoutes.clear()
        }
    
        return Selection(routes)
      }
    
      /** Prepares the proxy servers to try. */
      private fun resetNextProxy(
        url: HttpUrl,
        proxy: Proxy?,
      ) {
        fun selectProxies(): List<Proxy> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

        }
      timeout().deadlineNanoTime(nowNs + minOf(originalDurationNs, timeUnit.toNanos(duration.toLong())))
      return try {
        val skipBuffer = Buffer()
        while (read(skipBuffer, 8192) != -1L) {
          skipBuffer.clear()
        }
        true // Success! The source has been exhausted.
      } catch (_: InterruptedIOException) {
        false // We ran out of time before exhausting the source.
      } finally {
    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)
  8. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

         * [settings] before writing the response.
         */
        fun settings(settings: Settings) =
          apply {
            this.settings.clear()
            this.settings.merge(settings)
          }
    
        /**
         * Attempts to perform a web socket upgrade on the connection.
         * This will overwrite any previously set status, body, or streamHandler.
         */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  9. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        // Write metadata to the end of the file.
        writeMetadata(upstreamSize)
        file!!.channel.force(false)
    
        // Once everything else is in place we can swap the dirty header for a clean one.
        writeHeader(PREFIX_CLEAN, upstreamSize, metadata.size.toLong())
        file!!.channel.force(false)
    
        // This file is complete.
        synchronized(this@Relay) {
          complete = true
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

        val request: Request
          get() = originalRequest
    
        val call: RealCall
          get() = this@RealCall
    
        /**
         * Attempt to enqueue this async call on [executorService]. This will attempt to clean up
         * if the executor has been shut down by reporting the call as failed.
         */
        fun executeOn(executorService: ExecutorService) {
          client.dispatcher.assertThreadDoesntHoldLock()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
Back to top