Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for Source (0.19 sec)

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

          Http1ExchangeCodec(client, this, source, sink)
        }
      }
    
      @Throws(SocketException::class)
      internal fun newWebSocketStreams(exchange: Exchange): RealWebSocket.Streams {
        val socket = this.socket!!
        val source = this.source!!
        val sink = this.sink!!
    
        socket.soTimeout = 0
        noNewExchanges()
        return object : RealWebSocket.Streams(true, source, sink) {
          override fun close() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

        while (true) {
          val source = this.source!!
          val sink = this.sink!!
          val tunnelCodec =
            Http1ExchangeCodec(
              // No client for CONNECT tunnels:
              client = null,
              carrier = this,
              source = source,
              sink = sink,
            )
          source.timeout().timeout(readTimeoutMillis.toLong(), TimeUnit.MILLISECONDS)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

      fun maxDataLength(): Int = maxFrameSize
    
      /**
       * `source.length` may be longer than the max length of the variant's data frame. Implementations
       * must send multiple frames as necessary.
       *
       * @param source the buffer to draw bytes from. May be null if byteCount is 0.
       * @param byteCount must be between 0 and the minimum of `source.length` and [maxDataLength].
       */
      @Throws(IOException::class)
      fun data(
    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/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

          peerName: String = socket.peerName(),
          source: BufferedSource = socket.source().buffer(),
          sink: BufferedSink = socket.sink().buffer(),
        ) = apply {
          this.socket = socket
          this.connectionName =
            when {
              client -> "$okHttpName $peerName"
              else -> "MockWebServer $peerName"
            }
          this.source = source
          this.sink = sink
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

        }
      }
    
      /**
       * Returns the trailers. It is only safe to call this once the source stream has been completely
       * exhausted.
       */
      @Throws(IOException::class)
      fun trailers(): Headers {
        this.withLock {
          if (source.finished && source.receiveBuffer.exhausted() && source.readBuffer.exhausted()) {
            return source.trailers ?: EMPTY_HEADERS
          }
          if (errorCode != null) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  6. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        assertThat(stream.readBytes.total).isEqualTo(0L)
        assertThat(stream.takeHeaders()).isEqualTo(headersOf("a", "android"))
        val source = stream.getSource()
        val buffer = Buffer()
        buffer.writeAll(source)
        assertThat(source.read(buffer, 1)).isEqualTo(-1)
        assertThat(buffer.size).isEqualTo(150)
        val synStream = peer.takeFrame()
        assertThat(synStream.type).isEqualTo(Http2.TYPE_HEADERS)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt

       * one from the pool. We must take the pooled connection because by taking it from the pool, we've
       * fully acquired it.
       *
       * This test yields threads to force the decision of plan1 to be deliberate and not lucky. In
       * particular, we set up this sequence of events:
       *
       *  1. take plan 0
       *  3. plan 0 connects
       *  4. finish taking plan 1
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 20.9K bytes
    - Viewed (0)
Back to top