Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 47 for bytes (0.12 sec)

  1. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/AnyValue.kt

      var length: Long = -1L,
      val bytes: ByteString,
    ) {
      // Avoid Long.hashCode(long) which isn't available on Android 5.
      override fun hashCode(): Int {
        var result = 0
        result = 31 * result + tagClass
        result = 31 * result + tag.toInt()
        result = 31 * result + (if (constructed) 0 else 1)
        result = 31 * result + length.toInt()
        result = 31 * result + bytes.hashCode()
        return result
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  2. 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,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  3. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt

        @Throws(IOException::class)
        private fun BufferedSource.readData(data: Buffer) {
          data.writeByte('\n'.code)
          readFully(data, indexOfElement(CRLF))
          select(options) // Skip the newline bytes.
        }
    
        @Throws(IOException::class)
        private fun BufferedSource.readRetryMs(): Long {
          val retryString = readUtf8LineStrict()
          return retryString.toLongOrDefault(-1L)
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

     * limitations under the License.
     */
    package okhttp3.tls.internal.der
    
    import okio.Buffer
    import okio.ByteString
    
    /**
     * Encode and decode a model object like a [Long] or [Certificate] as DER bytes.
     */
    internal interface DerAdapter<T> {
      /** Returns true if this adapter can read [header] in a choice. */
      fun matches(header: DerHeader): Boolean
    
      /**
       * Returns a value from this adapter.
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

            )
            .hostnameVerifier(RecordingHostnameVerifier())
            .build()
        server.useHttps(handshakeCertificates.sslSocketFactory())
      }
    
      /** A request body that slowly trickles bytes, expecting to not complete. */
      private object SlowRequestBody : RequestBody() {
        override fun contentType(): MediaType? = null
    
        override fun writeTo(sink: BufferedSink) {
          for (i in 0 until 50) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt

        }
      }
    
      override fun onMessage(
        webSocket: WebSocket,
        bytes: ByteString,
      ) {
        Platform.get().log("[WS $name] onMessage", Platform.INFO, null)
        val delegate = delegate
        if (delegate != null) {
          this.delegate = null
          delegate.onMessage(webSocket, bytes)
        } else {
          events.add(Message(bytes = bytes))
        }
      }
    
      override fun onMessage(
        webSocket: WebSocket,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Settings.kt

        /** HTTP/2: Size in bytes of the table used to decode the sender's header blocks. */
        const val HEADER_TABLE_SIZE = 1
    
        /** HTTP/2: The peer must not send a PUSH_PROMISE frame when this is 0. */
        const val ENABLE_PUSH = 2
    
        /** Sender's maximum number of concurrent streams. */
        const val MAX_CONCURRENT_STREAMS = 4
    
        /** HTTP/2: Size in bytes of the largest frame payload the sender will accept. */
    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)
  8. docs/contribute/concurrency.md

    on writing I/O. We can't return from a write until we've pushed its bytes onto the socket. Otherwise, if the write fails we are unable to deliver its IOException to the application. We would have told the application layer that the write succeeded, but it didn't!
    
    The application-layer can also do blocking reads. If the application asks to read and there's nothing available, we need to hold that thread until either the bytes arrive, the stream is closed, or a timeout elapses. If we get bytes...
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 7K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http2/FlowControlListener.kt

       * [WindowCounter] generally carries the client view of total and acked bytes.
       */
      fun receivingStreamWindowChanged(
        streamId: Int,
        windowCounter: WindowCounter,
        bufferSize: Long,
      )
    
      /**
       * Notification that the receiving connection flow control window has changed.
       * [WindowCounter] generally carries the client view of total and acked bytes.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt

          @Throws(IOException::class)
          override fun write(
            source: Buffer,
            byteCount: Long,
          ) {
            val bytes = source.readByteString(byteCount)
            delegate.write(
              Buffer()
                .write(bytes.toAsciiUppercase()),
              byteCount,
            )
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
Back to top