Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for http2ErrorCode (0.05 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/SocketEffect.kt

      public object ShutdownConnection : SocketEffect
    
      /**
       * On HTTP/2 this will send the error code on the stream.
       *
       * On HTTP/1 this closes the socket.
       */
      public class CloseStream(
        public val http2ErrorCode: Int = 0,
      ) : SocketEffect
    
      /** Stop processing this. */
      public object Stall : 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)
  2. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

        SocketPolicy.STALL_SOCKET_AT_START -> result.onRequestStart(SocketEffect.Stall)
        SocketPolicy.NO_RESPONSE -> result.onResponseStart(SocketEffect.Stall)
        SocketPolicy.RESET_STREAM_AT_START -> result.onRequestStart(CloseStream(http2ErrorCode))
      }
    
      result.throttleBody(throttleBytesPerPeriod, getThrottlePeriod(MILLISECONDS), MILLISECONDS)
      result.bodyDelay(getBodyDelay(MILLISECONDS), MILLISECONDS)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 03 13:16:34 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        mockResponse = mockResponse.setChunkedBody("", 0)
        var socketPolicy: SocketPolicy = mockResponse.socketPolicy
        mockResponse.socketPolicy = SocketPolicy.KEEP_OPEN
        var http2ErrorCode: Int = mockResponse.http2ErrorCode
        mockResponse.http2ErrorCode = 0
        mockResponse = mockResponse.throttleBody(0L, 0L, TimeUnit.SECONDS)
        var throttleBytesPerPeriod: Long = mockResponse.throttleBytesPerPeriod
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

      ): Boolean {
        if (effect == null) return false
    
        when (effect) {
          is CloseStream -> {
            if (stream != null) {
              stream.close(ErrorCode.fromHttp2(effect.http2ErrorCode)!!, null)
            } else {
              socket.close()
            }
          }
    
          ShutdownConnection -> {
            if (stream != null) {
              stream.connection.shutdown(ErrorCode.NO_ERROR)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
Back to top