Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 78 for channel (0.22 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

          }
    
        val fileOperator = FileOperator(file!!.channel)
        fileOperator.write(0, header, FILE_HEADER_SIZE)
      }
    
      @Throws(IOException::class)
      private fun writeMetadata(upstreamSize: Long) {
        val metadataBuffer = Buffer()
        metadataBuffer.write(metadata)
    
        val fileOperator = FileOperator(file!!.channel)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  2. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainSocketFactory.java

      public UnixDomainSocketFactory(File path) {
        this.path = path;
      }
    
      @Override public Socket createSocket() throws IOException {
        UnixSocketChannel channel = UnixSocketChannel.open();
        return new TunnelingUnixSocket(path, channel);
      }
    
      @Override public Socket createSocket(String host, int port) throws IOException {
        Socket result = createSocket();
    
        try {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 03 21:33:52 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  3. okhttp-sse/src/test/java/okhttp3/sse/internal/ServerSentEventIteratorTest.kt

    import java.util.Deque
    import okio.Buffer
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.Test
    
    class ServerSentEventIteratorTest {
      /** Either [Event] or [Long] items for events and retry changes, respectively.  */
      private val callbacks: Deque<Any> = ArrayDeque()
    
      @AfterEach
      fun after() {
        assertThat(callbacks).isEmpty()
      }
    
      @Test
      fun multiline() {
        consumeEvents(
          """
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. docs/changelogs/changelog_4x.md

        impacts VM-wide behavior.
    
     *  New: Reduce contention for applications that make a very high number of concurrent requests.
        Previously OkHttp used its connection pool as a lock when making changes to connections and
        calls. With this change each connection is locked independently.
    
     *  Upgrade: [Okio 2.7.0][okio_2_7_0].
    
        ```kotlin
        implementation("com.squareup.okio:okio:2.7.0")
        ```
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        assertThat(readAscii(in1, 5)).isEqualTo("ABCDE")
        in1.close()
        call1.cancel()
        val call2 = client.newCall(newRequest("/"))
        val response2 = call2.execute()
        val in2 = response2.body.byteStream()
        assertThat(readAscii(in2, 5)).isEqualTo("LMNOP")
        in2.close()
        call2.cancel()
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        // Connection is pooled!
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/SocketChannelTest.kt

                listOf(Channel, Standard).flatMap { socketMode ->
                  listOf(DISABLED, STANDARD).map { tlsExtensionMode ->
                    TlsInstance(provider, protocol, tlsVersion, socketMode, tlsExtensionMode)
                  }
                }
              }
            }
          } + Channel + Standard
      }
    }
    
    sealed class SocketMode
    
    object Channel : SocketMode() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

      @Throws(IOException::class)
      internal fun cancelStreamIfNecessary() {
        lock.assertNotHeld()
    
        val open: Boolean
        val cancel: Boolean
        this.withLock {
          cancel = !source.finished && source.closed && (sink.finished || sink.closed)
          open = isOpen
        }
        if (cancel) {
          // RST this stream to prevent additional data from being sent. This is safe because the input
    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)
  8. okhttp/build.gradle.kts

           - The compressed index.xml file contains a timestamp property which
           changes with every test execution, such that running the test
           actually changes the test classpath itself. This means that it
           can"t benefit from incremental build acceleration, because on every
           execution it sees that the classpath has changed, and so to be
           safe, it needs to re-run.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Jan 04 05:32:07 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  9. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainServerSocketFactory.java

          return endpoint;
        }
    
        @Override public Socket accept() throws IOException {
          try {
            UnixSocketChannel channel = serverSocketChannel.accept();
            return new TunnelingUnixSocket(path, channel, endpoint);
          } catch (ClosedChannelException e) {
            SocketException exception = new SocketException();
            exception.initCause(e);
            throw exception;
          }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Feb 12 16:33:52 GMT 2019
    - 3.1K bytes
    - Viewed (0)
  10. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

              this,
              IllegalStateException("Invalid content-type: ${body.contentType()}"),
              response,
            )
            return
          }
    
          // This is a long-lived response. Cancel full-call timeouts.
          call?.timeout()?.cancel()
    
          // Replace the body with a stripped one so the callbacks can't see real data.
          val response = response.stripBody()
    
          val reader = ServerSentEventReader(body.source(), this)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
Back to top