Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CloseSocket (0.1 sec)

  1. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

        SocketPolicy.DISCONNECT_AT_START -> result.onRequestStart(CloseSocket())
        SocketPolicy.DISCONNECT_AFTER_REQUEST -> result.onResponseStart(CloseSocket())
        SocketPolicy.DISCONNECT_DURING_REQUEST_BODY -> result.onRequestBody(CloseSocket())
        SocketPolicy.DISCONNECT_DURING_RESPONSE_BODY -> result.onResponseBody(CloseSocket())
        SocketPolicy.DO_NOT_READ_REQUEST_BODY -> result.doNotReadRequestBody()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 03 13:16:34 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  2. 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("/"))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/SocketEffect.kt

    public sealed interface SocketEffect {
      /**
       * Close the TCP socket that carries this request.
       *
       * 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
    
      /**
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 1.6K bytes
    - Viewed (0)
Back to top