Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 97 for stream (0.16 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/Stream.kt

     */
    @ExperimentalOkHttpApi
    interface Stream {
      val requestBody: BufferedSource
      val responseBody: BufferedSink
    
      /**
       * Terminate the stream so that no further data is transmitted or received. Note that
       * [requestBody] may return data after this call; that is the buffered data received before this
       * stream was canceled.
       *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

          return socket.isHealthy(source)
        }
    
        return true
      }
    
      /** Refuse incoming streams. */
      @Throws(IOException::class)
      override fun onStream(stream: Http2Stream) {
        stream.close(ErrorCode.REFUSED_STREAM, null)
      }
    
      /** When settings are received, adjust the allocation limit. */
      override fun onSettings(
        connection: Http2Connection,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/RealStream.kt

     */
    package mockwebserver3.internal.duplex
    
    import mockwebserver3.Stream
    import okhttp3.internal.http2.ErrorCode
    import okhttp3.internal.http2.Http2Stream
    import okio.buffer
    
    /** Adapt OkHttp's internal [Http2Stream] type to the public [Stream] type. */
    internal class RealStream(
      private val http2Stream: Http2Stream,
    ) : Stream {
      override val requestBody = http2Stream.getSource().buffer()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Dec 31 18:24:52 GMT 2022
    - 1.1K bytes
    - Viewed (0)
  4. docs/changelogs/changelog_4x.md

    
    ## Version 4.3.0
    
    _2019-12-31_
    
     *  Fix: Degrade HTTP/2 connections after a timeout. When an HTTP/2 stream times out it may impact
        the stream only or the entire connection. With this fix OkHttp will now send HTTP/2 pings after
        a stream timeout to determine whether the connection should remain eligible for pooling.
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

    import okio.Source
    import okio.Timeout
    
    /**
     * Replicates a single upstream source into multiple downstream sources. Each downstream source
     * returns the same bytes as the upstream source. Downstream sources may read data either as it
     * is returned by upstream, or after the upstream source has been exhausted.
     *
     * As bytes are returned from upstream they are written to a local file. Downstream sources read
     * from this file as necessary.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

     * layer primitives: connections, requests, responses, and streams.
     *
     * This class supports [asynchronous canceling][cancel]. This is intended to have the smallest
     * blast radius possible. If an HTTP/2 stream is active, canceling will cancel that stream but not
     * the other streams sharing its connection. But if the TLS handshake is still in progress then
     * canceling may break the entire connection.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  7. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        assertThat(URLConnection.getDefaultRequestProperty("X-setDefaultRequestProperty")).isNull()
      }
    
      /**
       * Reads `count` characters from the stream. If the stream is exhausted before `count`
       * characters can be read, the remaining characters are returned and the stream is closed.
       */
      private fun readAscii(
        inputStream: InputStream,
        count: Int,
      ): String {
        val result = StringBuilder()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  8. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

        return EventSource.Factory { request, listener ->
          val actualRequest =
            if (request.header("Accept") == null) {
              request.newBuilder().addHeader("Accept", "text/event-stream").build()
            } else {
              request
            }
    
          RealEventSource(actualRequest, listener).apply {
            connect(callFactory)
          }
        }
      }
    
      @JvmStatic
      fun processResponse(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:18:15 GMT 2024
    - 1.6K bytes
    - Viewed (1)
  9. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

            }
          }
        assertFailsWith<IOException> {
          body.bytes()
        }.also { expected ->
          assertThat(expected.message).isEqualTo(
            "Content-Length (10) and stream length (5) disagree",
          )
        }
      }
    
      @Test
      fun bytesThrowsMoreThanIntMaxValue() {
        val body: ResponseBody =
          object : ResponseBody() {
            override fun contentType(): MediaType? {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  10. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        if (path.endsWith(".gif")) return "image/gif";
        if (path.endsWith(".html")) return "text/html; charset=utf-8";
        if (path.endsWith(".txt")) return "text/plain; charset=utf-8";
        return "application/octet-stream";
      }
    
      public static void main(String[] args) throws Exception {
        if (args.length != 4) {
          System.out.println("Usage: SampleServer <keystore> <password> <root file> <port>");
          return;
        }
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
Back to top