Search Options

Results per page
Sort
Preferred Languages
Advance

Results 391 - 400 of 527 for Fun (0.05 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http2/Huffman.kt

          sink.writeByte(accumulator.toInt())
        }
      }
    
      fun encodedLength(bytes: ByteString): Int {
        var bitCount = 0L
    
        for (i in 0 until bytes.size) {
          val byteIn = bytes[i] and 0xff
          bitCount += CODE_BIT_COUNTS[byteIn].toLong()
        }
    
        return ((bitCount + 7) shr 3).toInt() // Round up to an even byte.
      }
    
      fun decode(
        source: BufferedSource,
        byteCount: Long,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/ws/MessageInflater.kt

          true,
        )
    
      private val inflaterSource = InflaterSource(deflatedBytes, inflater)
    
      /** Inflates [buffer] in place as described in RFC 7692 section 7.2.2. */
      @Throws(IOException::class)
      fun inflate(buffer: Buffer) {
        require(deflatedBytes.size == 0L)
    
        if (noContextTakeover) {
          inflater.reset()
        }
    
        deflatedBytes.writeAll(buffer)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http2/HuffmanTest.kt

    class HuffmanTest {
      @Test
      fun roundTripForRequestAndResponse() {
        val s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
        for (i in s.indices) {
          assertRoundTrip(s.substring(0, i).encodeUtf8())
        }
        val random = Random(123456789L)
        val buf = ByteArray(4096)
        random.nextBytes(buf)
        assertRoundTrip(buf.toByteString())
      }
    
      private fun assertRoundTrip(data: ByteString) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Jan 04 05:32:07 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  4. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

      val clientTestRule = OkHttpClientTestRule()
    
      @RegisterExtension
      val platform = PlatformRule()
    
      private lateinit var server: MockWebServer
    
      @BeforeEach
      fun setUp(server: MockWebServer) {
        this.server = server
      }
    
      @Test
      fun clientSendsServerNameAndServerReceivesIt() {
        // java.net.ConnectException: Connection refused
        platform.assumeNotConscrypt()
    
        val handshakeCertificates = localhost()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

        )
      }
    
      fun newRoute(
        address: Address = newAddress(),
        proxy: Proxy = this.proxy,
        socketAddress: InetSocketAddress = InetSocketAddress.createUnresolved(uriHost, uriPort),
      ): Route {
        return Route(
          address = address,
          proxy = proxy,
          socketAddress = socketAddress,
        )
      }
    
      fun newChain(call: RealCall): RealInterceptorChain {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  6. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSourceListener.kt

      /**
       * Invoked when an event source has been accepted by the remote peer and may begin transmitting
       * events.
       */
      open fun onOpen(
        eventSource: EventSource,
        response: Response,
      ) {
      }
    
      /**
       * TODO description.
       */
      open fun onEvent(
        eventSource: EventSource,
        id: String?,
        type: String?,
        data: String,
      ) {
      }
    
      /**
       * TODO description.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http/DateFormatting.kt

    /**
     * Most websites serve cookies in the blessed format. Eagerly create the parser to ensure such
     * cookies are on the fast path.
     */
    private val STANDARD_DATE_FORMAT =
      object : ThreadLocal<DateFormat>() {
        override fun initialValue(): DateFormat {
          // Date format specified by RFC 7231 section 7.1.1.1.
          return SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.US).apply {
            isLenient = false
            timeZone = UTC
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/tls/ClientAuthTest.kt

      private lateinit var clientRootCa: HeldCertificate
      private lateinit var clientIntermediateCa: HeldCertificate
      private lateinit var clientCert: HeldCertificate
    
      @BeforeEach
      fun setUp(server: MockWebServer) {
        this.server = server
        platform.assumeNotOpenJSSE()
        platform.assumeNotBouncyCastle()
        serverRootCa =
          HeldCertificate.Builder()
            .serialNumber(1L)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/kt/CancelCall.kt

    import java.util.concurrent.TimeUnit
    import okhttp3.OkHttpClient
    import okhttp3.Request
    
    class CancelCall {
      private val executor = Executors.newScheduledThreadPool(1)
      private val client = OkHttpClient()
    
      fun run() {
        val request =
          Request.Builder()
            .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay.
            .build()
    
        val startNanos = System.nanoTime()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk9Platform.kt

    import javax.net.ssl.X509TrustManager
    import okhttp3.Protocol
    import okhttp3.internal.SuppressSignatureCheck
    
    /** OpenJDK 9+. */
    open class Jdk9Platform : Platform() {
      @SuppressSignatureCheck
      override fun configureTlsExtensions(
        sslSocket: SSLSocket,
        hostname: String?,
        protocols: List<@JvmSuppressWildcards Protocol>,
      ) {
        val sslParameters = sslSocket.sslParameters
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top