Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 141 for Messages (0.21 sec)

  1. mockwebserver/README.md

      chat.loadMore();
      assertEquals("hello, world!", chat.messages());
    
      chat.loadMore();
      chat.loadMore();
      assertEquals(""
          + "hello, world!\n"
          + "sup, bra?\n"
          + "yo dog", chat.messages());
    
      // Optional: confirm that your app made the HTTP requests you were expecting.
      RecordedRequest request1 = server.takeRequest();
      assertEquals("/v1/chat/messages/", request1.getPath());
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  2. docs/changelogs/changelog_4x.md

     *  New: `OkHttpClient.Builder.minWebSocketMessageToCompress()` configures a threshold for
        compressing outbound web socket messages. Configure this with 0L to always compress outbound
        messages and `Long.MAX_VALUE` to never compress outbound messages. The default is 1024L which
        compresses messages of size 1 KiB and larger. (Inbound messages are compressed or not based on
        the web socket server's configuration.)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt

      }
    
      fun assertFailure(
        cls: Class<out IOException?>?,
        vararg messages: String,
      ) {
        val event = nextEvent() as Failure
        assertThat(event.response).isNull()
        assertThat(event.t.javaClass).isEqualTo(cls)
        if (messages.isNotEmpty()) {
          assertThat(messages).contains(event.t.message)
        }
      }
    
      fun assertFailure() {
        nextEvent() as Failure
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/WebSocketListener.kt

       * messages.
       */
      open fun onOpen(
        webSocket: WebSocket,
        response: Response,
      ) {
      }
    
      /** Invoked when a text (type `0x1`) message has been received. */
      open fun onMessage(
        webSocket: WebSocket,
        text: String,
      ) {
      }
    
      /** Invoked when a binary (type `0x2`) message has been received. */
      open fun onMessage(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

        }
    
        try {
          if (pong != null) {
            writer!!.writePong(pong)
          } else if (messageOrClose is Message) {
            val message = messageOrClose as Message
            writer!!.writeMessageFrame(message.formatOpcode, message.data)
            synchronized(this) {
              queueSize -= message.data.size.toLong()
            }
          } else if (messageOrClose is Close) {
            val close = messageOrClose as Close
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

        // Empty server to client message.
        val message3 = ""
        server.send(message3)
        clientListener.assertTextMessage(message3)
    
        // Empty client to server message.
        val message4 = ""
        client.send(message4)
        serverListener.assertTextMessage(message4)
    
        // Server to client message that shares context with message1.
        val message5 = message1 + message1
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  7. okhttp/src/test/java/okhttp3/RecordedResponse.kt

        }
    
      fun assertFailure(vararg messages: String) =
        apply {
          assertThat(failure, "No failure found").isNotNull()
          assertThat(messages).contains(failure!!.message)
        }
    
      fun assertFailureMatches(vararg patterns: String) =
        apply {
          val message = failure!!.message!!
          assertThat(
            patterns.firstOrNull { pattern ->
              message.matches(pattern.toRegex())
            },
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

          }
    
        fun assertNoMoreLogs() {
          assertThat(logs.size, "More messages remain: ${logs.subList(index, logs.size)}")
            .isEqualTo(index)
        }
    
        override fun log(message: String) {
          logs.add(message)
        }
      }
    
      companion object {
        private val PLAIN = "text/plain; charset=utf-8".toMediaType()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

            .build(),
        )
        val response = getResponse(newRequest("/"))
        assertThat(response.protocol).isEqualTo(Protocol.HTTP_1_1)
      }
    
      /** For example, empty Protobuf RPC messages end up as a zero-length POST.  */
      @Test
      fun zeroLengthPost() {
        zeroLengthPayload("POST")
      }
    
      @Test
      fun zeroLengthPost_HTTP_2() {
        enableProtocol(Protocol.HTTP_2)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

          val statusLine = StatusLine.parse(headersReader.readLine())
    
          val responseBuilder =
            Response.Builder()
              .protocol(statusLine.protocol)
              .code(statusLine.code)
              .message(statusLine.message)
              .headers(headersReader.readHeaders())
              .trailers { error("trailers not available") }
    
          return when {
            expectContinue && statusLine.code == HTTP_CONTINUE -> {
              null
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
Back to top