Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 124 for Closes (0.2 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

        if (eventSequence.isEmpty()) {
          assertThat(e).isInstanceOf(ConnectionEvent.ConnectStart::class.java)
        } else {
          eventSequence.forEach loop@{
            when (e.closes(it)) {
              null -> return // no open event
              true -> return // found open event
              false -> return@loop // this is not the open event so continue
            }
          }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

      override fun request(): Request = originalRequest
    
      /**
       * Immediately closes the socket connection if it's currently held. Use this to interrupt an
       * in-flight request from any thread. It's the caller's responsibility to close the request body
       * and response body streams; otherwise resources may be leaked.
       *
    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)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/ConnectionEvent.kt

    @SuppressSignatureCheck
    sealed class ConnectionEvent {
      abstract val timestampNs: Long
      open val connection: Connection?
        get() = null
    
      /** Returns if the event closes this event, or null if this is no open event. */
      open fun closes(event: ConnectionEvent): Boolean? = null
    
      val name: String
        get() = javaClass.simpleName
    
      data class ConnectStart(
        override val timestampNs: Long,
        val route: Route,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/CallEvent.kt

    @SuppressSignatureCheck
    sealed class CallEvent {
      abstract val timestampNs: Long
      abstract val call: Call
    
      val name: String
        get() = javaClass.simpleName
    
      /** Returns if the event closes this event, or null if this is no open event. */
      open fun closes(event: CallEvent): Boolean? = null
    
      data class ProxySelectStart(
        override val timestampNs: Long,
        override val call: Call,
        val url: HttpUrl,
      ) : CallEvent()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

                @Throws(IOException::class)
                override fun close() {
                  closed.set(true)
                  super.close()
                }
              }.buffer()
            }
          }
        body.charStream().close()
        assertThat(closed.get()).isTrue()
      }
    
      @Test
      fun readerClosedAfterBomClosesUnderlyingSource() {
        val closed = AtomicBoolean()
        val body: ResponseBody =
    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)
  6. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

       *  * 8 bytes: *n*: upstream data size
       *  * 8 bytes: *m*: metadata size
       *  * *n* bytes: upstream data
       *  * *m* bytes: metadata
       *
       * This is closed and assigned to null when the last source is closed and no further sources
       * are permitted.
       */
      var file: RandomAccessFile?,
      /**
       * Null once the file has a complete copy of the upstream bytes. Only the [upstreamReader] thread
    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)
  7. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

          object : EventListener() {
            var socket: SSLSocket? = null
            var closed = false
    
            override fun connectionAcquired(
              call: Call,
              connection: Connection,
            ) {
              socket = connection.socket() as SSLSocket
            }
    
            override fun requestHeadersStart(call: Call) {
              if (closed) {
                throw IOException("fake socket failure")
              }
            }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

        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)
        require(length < bytesOut.size - lastFrame.start)
    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-sse/src/main/kotlin/okhttp3/sse/EventSource.kt

      fun request(): Request
    
      /**
       * Immediately and violently release resources held by this event source. This does nothing if
       * the event source has already been closed or canceled.
       */
      fun cancel()
    
      fun interface Factory {
        /**
         * Creates a new event source and immediately returns it. Creating an event source initiates an
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Callback.kt

      /**
       * Called when the HTTP response was successfully returned by the remote server. The callback may
       * proceed to read the response body with [Response.body]. The response is still live until its
       * response body is [closed][ResponseBody]. The recipient of the callback may consume the response
       * body on another thread.
       *
       * Note that transport-layer success (receiving a HTTP response code, headers and body) does not
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.6K bytes
    - Viewed (0)
Back to top