Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,509 for pong (0.2 sec)

  1. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

        // At 0ms the server sends 3 unexpected pongs. The client accepts 'em and ignores em.
        server.webSocket!!.pong("pong 1".encodeUtf8())
        client.processNextFrame()
        server.webSocket!!.pong("pong 2".encodeUtf8())
        client.processNextFrame()
        taskFaker.runTasks()
        server.webSocket!!.pong("pong 3".encodeUtf8())
        client.processNextFrame()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt

        assertThat(nextEvent()).isEqualTo(Message(payload))
      }
    
      fun assertPing(payload: ByteString) {
        assertThat(nextEvent()).isEqualTo(Ping(payload))
      }
    
      fun assertPong(payload: ByteString) {
        assertThat(nextEvent()).isEqualTo(Pong(payload))
      }
    
      fun assertClosing(
        code: Int,
        reason: String,
      ) {
        assertThat(nextEvent()).isEqualTo(Closing(code, reason))
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/ws/WebSocketReaderTest.kt

      }
    
      @Test fun clientTwoFrameHelloWithPongs() {
        data.write("010348656c".decodeHex()) // Hel
        data.write("8a00".decodeHex()) // Pong
        data.write("8a00".decodeHex()) // Pong
        data.write("8a00".decodeHex()) // Pong
        data.write("8a00".decodeHex()) // Pong
        data.write("80026c6f".decodeHex()) // lo
        clientReader.processNextFrame()
        callback.assertPong(EMPTY)
        callback.assertPong(EMPTY)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

      /** Send a ping with the supplied [payload]. */
      @Throws(IOException::class)
      fun writePing(payload: ByteString) {
        writeControlFrame(OPCODE_CONTROL_PING, payload)
      }
    
      /** Send a pong with the supplied [payload]. */
      @Throws(IOException::class)
      fun writePong(payload: ByteString) {
        writeControlFrame(OPCODE_CONTROL_PONG, payload)
      }
    
      /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

       *
       * To differentiate the two cases we ping the server when a stream times out. If the overall
       * connection is fine the ping will receive a pong; otherwise it won't.
       *
       * The deadline to respond to this ping attempts to limit the cost of being wrong. If it is too
       * long, streams created while we await the pong will reuse broken connections and inevitably
    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)
  6. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

          awaitingPong = true
        }
    
        if (failedPing != -1) {
          failWebSocket(
            e =
              SocketTimeoutException(
                "sent ping but didn't receive pong within " +
                  "${pingIntervalMillis}ms (after ${failedPing - 1} successful ping/pongs)",
              ),
            isWriter = true,
          )
          return
        }
    
        try {
          writer.writePing(ByteString.EMPTY)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketReader.kt

    import okhttp3.internal.ws.WebSocketProtocol.OPCODE_CONTROL_PING
    import okhttp3.internal.ws.WebSocketProtocol.OPCODE_CONTROL_PONG
    import okhttp3.internal.ws.WebSocketProtocol.OPCODE_FLAG_CONTROL
    import okhttp3.internal.ws.WebSocketProtocol.OPCODE_TEXT
    import okhttp3.internal.ws.WebSocketProtocol.PAYLOAD_BYTE_MAX
    import okhttp3.internal.ws.WebSocketProtocol.PAYLOAD_LONG
    import okhttp3.internal.ws.WebSocketProtocol.PAYLOAD_SHORT
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        peer.acceptFrame() // RST_STREAM
        peer.acceptFrame() // DEGRADED PING
        peer.acceptFrame() // AWAIT PING
        peer.sendFrame().ping(true, Http2Connection.DEGRADED_PING, 1) // DEGRADED PONG
        peer.sendFrame().ping(true, Http2Connection.AWAIT_PING, 0) // AWAIT PONG
        peer.play()
    
        // Play it back.
        val connection = connect(peer)
    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)
  9. internal/grid/connection.go

    		return
    	}
    	// Single calls do not support pinging.
    	if v, ok := c.inStream.Load(m.MuxID); ok {
    		pong := v.ping(m.Seq)
    		gridLogIf(ctx, c.queueMsg(m, &pong))
    	} else {
    		pong := pongMsg{NotFound: true}
    		gridLogIf(ctx, c.queueMsg(m, &pong))
    	}
    	return
    }
    
    func (c *Connection) handleDisconnectClientMux(m message) {
    	if v, ok := c.outgoing.Load(m.MuxID); ok {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/HeadersJvmTest.kt

            .add("ping:  pong  ") // Value whitespace is trimmed.
            .add("kit:kat") // Space after colon is not required.
            .build()
        assertThat(headers.values("foo")).containsExactly("bar", "baz", "bak")
        assertThat(headers.values("key")).containsExactly("value")
        assertThat(headers.values("ping")).containsExactly("pong")
        assertThat(headers.values("kit")).containsExactly("kat")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
Back to top