Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for tcp (0.13 sec)

  1. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainSocketFactory.java

    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.InetSocketAddress;
    import java.net.Socket;
    import javax.net.SocketFactory;
    import jnr.unixsocket.UnixSocketChannel;
    
    /** Impersonate TCP-style SocketFactory over UNIX domain sockets. */
    public final class UnixDomainSocketFactory extends SocketFactory {
      private final File path;
    
      public UnixDomainSocketFactory(File path) {
        this.path = path;
      }
    
    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)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

     * by holding a lock on the connection.
     */
    class RealConnection(
      val taskRunner: TaskRunner,
      val connectionPool: RealConnectionPool,
      override val route: Route,
      /** The low-level TCP socket. */
      private var rawSocket: Socket?,
      /**
       * The application layer socket. Either an [SSLSocket] layered over [rawSocket], or [rawSocket]
       * itself if this connection does not use SSL.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt

        )
    
        taskFaker.advanceUntil(520.ms)
        assertEvents(
          "plan 1 TCP connect failed",
        )
    
        taskFaker.advanceUntil(530.ms)
        assertEvents(
          "plan 2 TCP connect failed",
          "take plan 3",
          "plan 3 TCP connecting...",
        )
    
        taskFaker.advanceUntil(780.ms)
        assertEvents(
          "take plan 4",
          "plan 4 TCP connecting...",
        )
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

    import okio.BufferedSink
    import okio.BufferedSource
    import okio.buffer
    import okio.sink
    import okio.source
    
    /**
     * A single attempt to connect to a remote server, including these steps:
     *
     *  * [TCP handshake][connectSocket]
     *  * Optional [CONNECT tunnels][connectTunnel]. When using an HTTP proxy to reach an HTTPS server
     *    we must send a `CONNECT` request, and handle authorization challenges from the proxy.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  5. docs/features/connections.md

     * Don't start a new attempt until 250 ms after the most recent attempt was started.
     * Keep whichever TCP connection succeeds first and cancel all the others.
     * Race TCP only. Only attempt a TLS handshake on the winning TCP connection.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Feb 21 03:33:59 GMT 2022
    - 5.4K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

            if (connectResult == null) {
              connectResult = awaitTcpConnect(awaitTimeoutNanos, TimeUnit.NANOSECONDS) ?: continue
            }
    
            if (connectResult.isSuccess) {
              // We have a connected TCP connection. Cancel and defer the racing connects that all lost.
              cancelInFlightConnects()
    
              // Finish connecting. We won't have to if the winner is from the connection pool.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  7. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainServerSocketFactory.java

    import javax.net.ServerSocketFactory;
    import jnr.unixsocket.UnixServerSocketChannel;
    import jnr.unixsocket.UnixSocketAddress;
    import jnr.unixsocket.UnixSocketChannel;
    
    /** Impersonate TCP-style ServerSocketFactory over UNIX domain sockets. */
    public final class UnixDomainServerSocketFactory extends ServerSocketFactory {
      private final File path;
    
      public UnixDomainServerSocketFactory(File path) {
    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)
  8. okhttp/src/test/java/okhttp3/FakeRoutePlanner.kt

          check(connectState == ConnectState.READY)
          events += "plan $id TCP connecting..."
    
          taskFaker.sleep(tcpConnectDelayNanos)
    
          if (yieldBeforeTcpConnectReturns) {
            taskFaker.yield()
          }
    
          return when {
            tcpConnectThrowable != null -> {
              events += "plan $id TCP connect failed"
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  9. docs/contribute/concurrency.md

    Similarly, the reader thread must never block on writing because this can deadlock the connection. Consider a client and server that both violate this rule. If you get unlucky, they could fill up their TCP buffers (so that writes block) and then use their reader threads to write a frame. Nobody is reading on either end, and the buffers are never drained.
    
    #### Do-stuff-later pool
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 7K bytes
    - Viewed (0)
  10. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/TunnelingUnixSocket.java

    import java.net.SocketAddress;
    import jnr.unixsocket.UnixSocket;
    import jnr.unixsocket.UnixSocketAddress;
    import jnr.unixsocket.UnixSocketChannel;
    
    /**
     * Subtype UNIX socket for a higher-fidelity impersonation of TCP sockets. This is named "tunneling"
     * because it assumes the ultimate destination has a hostname and port.
     */
    final class TunnelingUnixSocket extends UnixSocket {
      private final File path;
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Feb 12 16:33:52 GMT 2019
    - 1.9K bytes
    - Viewed (1)
Back to top