Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 12 for shutdownOutput (0.07 seconds)

  1. mockwebserver/src/main/kotlin/mockwebserver3/internal/MockWebServerSocket.kt

            ?.let { Platform.Companion.get().getHandshakeServerNames(it) }
            ?: listOf()
    
      fun shutdownInput() {
        javaNetSocket.shutdownInput()
      }
    
      fun shutdownOutput() {
        javaNetSocket.shutdownOutput()
      }
    
      /** Sleeps [nanos], throwing if the socket is closed before that period has elapsed. */
      fun sleepWhileOpen(nanos: Long) {
        var ms = nanos / 1_000_000L
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Thu Jul 31 04:18:40 GMT 2025
    - 3.3K bytes
    - Click Count (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocket.kt

    ) : SSLSocket() {
      @Throws(IOException::class)
      override fun shutdownInput() {
        delegate!!.shutdownInput()
      }
    
      @Throws(IOException::class)
      override fun shutdownOutput() {
        delegate!!.shutdownOutput()
      }
    
      override fun getSupportedCipherSuites(): Array<String> = delegate!!.supportedCipherSuites
    
      override fun getEnabledCipherSuites(): Array<String> = delegate!!.enabledCipherSuites
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 7.4K bytes
    - Click Count (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/SocketEffect.kt

       * Using this as [MockResponse.onResponseEnd] is the default for HTTP/1.0.
       */
      public class CloseSocket(
        public val closeSocket: Boolean = true,
        public val shutdownInput: Boolean = false,
        public val shutdownOutput: Boolean = false,
      ) : SocketEffect
    
      /**
       * On HTTP/2, send a [GOAWAY frame](https://tools.ietf.org/html/rfc7540#section-6.8) immediately
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Jun 20 11:46:46 GMT 2025
    - 1.6K bytes
    - Click Count (0)
  4. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

              shutdownInput = true,
            ),
          )
        }
    
        SocketPolicy.SHUTDOWN_OUTPUT_AT_END -> {
          result.onResponseEnd(
            CloseSocket(
              closeSocket = false,
              shutdownOutput = true,
            ),
          )
        }
    
        SocketPolicy.STALL_SOCKET_AT_START -> {
          result.onRequestStart(SocketEffect.Stall)
        }
    
        SocketPolicy.NO_RESPONSE -> {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 4.3K bytes
    - Click Count (1)
  5. okhttp/src/jvmTest/kotlin/okhttp3/CallKotlinTest.kt

            ).build()
    
        server.enqueue(
          MockResponse
            .Builder()
            .body("a")
            .onResponseEnd(
              CloseSocket(
                closeSocket = false,
                shutdownOutput = true,
              ),
            ).build(),
        )
        server.enqueue(MockResponse(body = "b"))
    
        val requestA = Request(server.url("/"))
        val responseA = client.newCall(requestA).execute()
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Jun 20 11:46:46 GMT 2025
    - 8.4K bytes
    - Click Count (0)
  6. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

            } else {
              socket.close()
            }
          }
    
          is CloseSocket -> {
            if (effect.shutdownInput) socket.shutdownInput()
            if (effect.shutdownOutput) socket.shutdownOutput()
            if (effect.closeSocket) socket.close()
          }
    
          Stall -> {
            // Sleep until the socket is closed.
            socket.sleepWhileOpen(TimeUnit.MINUTES.toNanos(60))
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 40.3K bytes
    - Click Count (0)
  7. src/main/java/jcifs/smb1/smb1/SmbTransport.java

            try {
                while (iter.hasNext()) {
                    final SmbSession ssn = (SmbSession) iter.next();
                    ssn.logoff(hard);
                }
                socket.shutdownOutput();
                out.close();
                in.close();
                socket.close();
            } finally {
                digest = null;
                socket = null;
                tconHostName = null;
            }
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 31.8K bytes
    - Click Count (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

          MockResponse
            .Builder()
            .body("This connection won't pool properly")
            .onResponseEnd(
              CloseSocket(
                closeSocket = false,
                shutdownOutput = true,
              ),
            ).build(),
        )
      }
    
      @Test
      fun invalidHost() {
        // Note that 1234.1.1.1 is an invalid host in a URI, but URL isn't as strict.
        client =
          client
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 133.3K bytes
    - Click Count (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

        server.enqueue(MockResponse(body = "abc"))
        server.enqueue(
          MockResponse
            .Builder()
            .onResponseStart(
              CloseSocket(
                closeSocket = false,
                shutdownOutput = true,
              ),
            ).build(),
        )
        server.enqueue(MockResponse(body = "abc"))
    
        val client =
          client
            .newBuilder()
            .retryOnConnectionFailure(false)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:02:18 GMT 2026
    - 146.5K bytes
    - Click Count (0)
  10. CHANGELOG.md

    _2025-11-16_
    
    This release is the same as 5.2.1. Okio 3.16.3 didn't have a necessary fix!
    
     *  Upgrade: [Okio 3.16.3][okio_3_16_3].
    
    
    ## Version 5.2.1
    
    _2025-10-09_
    
     *  Fix: Don't crash when calling `Socket.shutdownOutput()` or `shutdownInput()` on an `SSLSocket`
        on Android API 21 through 23. This method throws an `UnsupportedOperationException`, so we now
        catch that and close the underlying stream instead.
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Feb 15 11:57:47 GMT 2026
    - 36.2K bytes
    - Click Count (2)
Back to Top