Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for writeShort (0.18 sec)

  1. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

      fun encodeQuery(
        host: String,
        type: Int,
      ): ByteString =
        Buffer().apply {
          writeShort(0) // query id
          writeShort(256) // flags with recursion
          writeShort(1) // question count
          writeShort(0) // answerCount
          writeShort(0) // authorityResourceCount
          writeShort(0) // additional
    
          val nameBuf = Buffer()
          val labels = host.split('.').dropLastWhile { it.isEmpty() }
    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)
  2. okhttp/src/test/java/okhttp3/SocksProxy.kt

            fromSink.writeByte(VERSION_5)
            fromSink.writeByte(REPLY_SUCCEEDED)
            fromSink.writeByte(0)
            fromSink.writeByte(ADDRESS_TYPE_IPV4)
            fromSink.write(localAddress)
            fromSink.writeShort(toSocket.localPort)
            fromSink.emit()
            logger.log(Level.INFO, "SocksProxy connected $fromAddress to $toAddress")
    
            // Copy sources to sinks in both directions.
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

            val id =
              when (i) {
                4 -> 3 // SETTINGS_MAX_CONCURRENT_STREAMS renumbered.
                7 -> 4 // SETTINGS_INITIAL_WINDOW_SIZE renumbered.
                else -> i
              }
            sink.writeShort(id)
            sink.writeInt(settings[i])
          }
          sink.flush()
        }
      }
    
      /**
       * Send a connection-level ping to the peer. `ack` indicates this is a reply. The data in
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/http2/Http2Test.kt

        frame.writeByte(Http2.TYPE_SETTINGS)
        frame.writeByte(FLAG_NONE)
        frame.writeInt(0) // Settings are always on the connection stream 0.
        frame.writeShort(1) // SETTINGS_HEADER_TABLE_SIZE
        frame.writeInt(reducedTableSizeBytes)
        frame.writeShort(2) // SETTINGS_ENABLE_PUSH
        frame.writeInt(0)
        reader.nextFrame(
          requireSettings = false,
          object : BaseTestHandler() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

      ) {
        var payload = ByteString.EMPTY
        if (code != 0 || reason != null) {
          if (code != 0) {
            validateCloseCode(code)
          }
          payload =
            Buffer().run {
              writeShort(code)
              if (reason != null) {
                write(reason)
              }
              readByteString()
            }
        }
    
        try {
          writeControlFrame(OPCODE_CONTROL_CLOSE, payload)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

          assertThat(expected.message).isEqualTo("index == 0")
        }
      }
    
      // Example taken from twitter/hpack DecoderTest.testIllegalIndex
      @Test
      fun readIndexedHeaderFieldTooLargeIndex() {
        bytesIn.writeShort(0xff00) // == Indexed - Add idx = 127
        assertFailsWith<IOException> {
          hpackReader!!.readHeaders()
        }.also { expected ->
          assertThat(expected.message).isEqualTo("Header index too large 127")
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 38.2K bytes
    - Viewed (0)
  7. okhttp-android/src/main/baseline-prof.txt

    HSPLokio/Buffer;->writeAll(Lokio/Source;)J
    HSPLokio/Buffer;->writeByte(I)Lokio/Buffer;
    HSPLokio/Buffer;->writeByte(I)Lokio/BufferedSink;
    HSPLokio/Buffer;->writeInt(I)Lokio/Buffer;
    HSPLokio/Buffer;->writeShort(I)Lokio/Buffer;
    HSPLokio/Buffer;->writeUtf8(Ljava/lang/String;)Lokio/Buffer;
    HSPLokio/Buffer;->writeUtf8(Ljava/lang/String;II)Lokio/Buffer;
    HSPLokio/ByteString$Companion;-><init>(Landroidx/lifecycle/viewmodel/R$id;)V
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Mar 21 11:22:00 GMT 2022
    - 127.9K bytes
    - Viewed (0)
Back to top