Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 86 for straum (0.16 sec)

  1. 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)
  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,
        settings: Settings,
      ) {
    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. 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)
  4. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        //     timeout is hit we like to tear down the whole stream.
    
        private const val SOURCE_UPSTREAM = 1
        private const val SOURCE_FILE = 2
    
        @JvmField val PREFIX_CLEAN = "OkHttp cache v1\n".encodeUtf8()
    
        @JvmField val PREFIX_DIRTY = "OkHttp DIRTY :(\n".encodeUtf8()
        private const val FILE_HEADER_SIZE = 32L
    
        /**
         * Creates a new relay that reads a live stream from [upstream], using [file] to share that data
    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)
  5. 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.
     */
    class RealCall(
      val client: OkHttpClient,
    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)
  6. 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)
  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/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)
  9. 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)
  10. mockwebserver/README.md

    from your test's `tearDown()`.
    
    ### API
    
    #### MockResponse
    
    Mock responses default to an empty response body and a `200` status code.
    You can set a custom body with a string, input stream or byte array. Also
    add headers with a fluent builder API.
    
    ```java
    MockResponse response = new MockResponse()
        .addHeader("Content-Type", "application/json; charset=utf-8")
        .addHeader("Cache-Control", "no-cache")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
Back to top