Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 52 for peek (0.16 sec)

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

            ) {
              chunked = true
            }
          }
    
          val peek = dispatcher.peek()
          for (response in peek.informationalResponses) {
            writeHttpResponse(socket, sink, response)
          }
    
          var hasBody = false
          val policy = dispatcher.peek()
          val requestBodySink =
            requestBody.withThrottlingAndSocketPolicy(
              policy = policy,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  2. mockwebserver/src/main/kotlin/mockwebserver3/QueueDispatcher.kt

        // other threads waiting on take() will also return.
        if (result == DEAD_LETTER) responseQueue.add(DEAD_LETTER)
    
        return result
      }
    
      override fun peek(): MockResponse {
        return responseQueue.peek() ?: failFastResponse ?: super.peek()
      }
    
      open fun enqueueResponse(response: MockResponse) {
        responseQueue.add(response)
      }
    
      open fun clear() {
        responseQueue.clear()
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 3K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt

    @Throws(EOFException::class)
    private fun Buffer.readChallengeHeader(result: MutableList<Challenge>) {
      var peek: String? = null
    
      while (true) {
        // Read a scheme name for this challenge if we don't have one already.
        if (peek == null) {
          skipCommasAndWhitespace()
          peek = readToken()
          if (peek == null) return
        }
    
        val schemeName = peek
    
        // Read a token68, a sequence of parameters, or nothing.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/Dispatcher.kt

       * can return other values to test HTTP edge cases, such as unhappy socket policies or throttled
       * request bodies.
       */
      open fun peek(): MockResponse {
        return MockResponse(socketPolicy = KeepOpen)
      }
    
      /**
       * Release any resources held by this dispatcher. Any requests that are currently being dispatched
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  5. mockwebserver-deprecated/api/mockwebserver.api

    public abstract class okhttp3/mockwebserver/Dispatcher {
    	public fun <init> ()V
    	public abstract fun dispatch (Lokhttp3/mockwebserver/RecordedRequest;)Lokhttp3/mockwebserver/MockResponse;
    	public fun peek ()Lokhttp3/mockwebserver/MockResponse;
    	public fun shutdown ()V
    }
    
    public final class okhttp3/mockwebserver/MockResponse : java/lang/Cloneable {
    	public static final field Companion Lokhttp3/mockwebserver/MockResponse$Companion;
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jul 22 12:28:51 GMT 2023
    - 10.2K bytes
    - Viewed (0)
  6. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt

      @Test @Ignore
      fun dispatcherFromMockWebServer() {
        val dispatcher =
          object : Dispatcher() {
            override fun dispatch(request: RecordedRequest): MockResponse = TODO()
    
            override fun peek(): MockResponse = TODO()
    
            override fun shutdown() = TODO()
          }
      }
    
      @Test @Ignore
      fun mockResponse() {
        var mockResponse: MockResponse = MockResponse()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.3K bytes
    - Viewed (1)
  7. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

      name: String,
      defaultValue: String?,
    ): String? = headers[name] ?: defaultValue
    
    @Throws(IOException::class)
    fun Response.commonPeekBody(byteCount: Long): ResponseBody {
      val peeked = body.source().peek()
      val buffer = Buffer()
      peeked.request(byteCount)
      buffer.write(peeked, minOf(byteCount, peeked.buffer.size))
      return buffer.asResponseBody(body.contentType(), buffer.size)
    }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

        outFrames.add(OutFrame(frameCount++, bytesOut.size, false))
        return writer
      }
    
      /**
       * Shortens the last frame from its original length to `length`. This will cause the peer to
       * close the socket as soon as this frame has been written; otherwise the peer stays open until
       * explicitly closed.
       */
      fun truncateLastFrame(length: Int): Http2Writer {
        val lastFrame = outFrames.removeAt(outFrames.size - 1)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

          if (context.executionException.isPresent) return@AfterEachCallback
          assertThat(data.readByteString().hex(), "Data not empty")
            .isEqualTo("")
        }
    
      // Mutually exclusive. Use the one corresponding to the peer whose behavior you wish to test.
      private val serverWriter =
        WebSocketWriter(
          isClient = false,
          sink = data,
          random = random,
          perMessageDeflate = false,
          noContextTakeover = false,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  10. docs/changelogs/changelog_4x.md

        server.useHttps(handshakeCertificates.sslSocketFactory(), false)
        ```
    
        Get these strings with `HeldCertificate.certificatePem()` and `privateKeyPkcs8Pem()`.
    
     *  Fix: Handshake now returns peer certificates in canonical order: each certificate is signed by
        the certificate that follows and the last certificate is signed by a trusted root.
    
    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)
Back to top