Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for openStreamCount (0.27 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        // Play it back.
        val connection = connect(peer)
        connection.newStream(headerEntries("b", "banana"), false)
        assertThat(connection.openStreamCount()).isEqualTo(1)
        connection.writePingAndAwaitPong() // Ensure that the SYN_REPLY has been received.
        assertThat(connection.openStreamCount()).isEqualTo(0)
    
        // Verify the peer received what was expected.
        val synStream = peer.takeFrame()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

              return@schedule pingIntervalNanos
            }
          }
        }
      }
    
      /**
       * Returns the number of [open streams][Http2Stream.isOpen] on this connection.
       */
      fun openStreamCount(): Int = this.withLock { streams.size }
    
      fun getStream(id: Int): Http2Stream? = this.withLock { streams[id] }
    
      internal fun removeStream(streamId: Int): Http2Stream? {
        this.withLock {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
Back to top