Search Options

Results per page
Sort
Preferred Languages
Advance

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

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

      @Test fun serverTextMessage() {
        serverWriter.writeMessageFrame(OPCODE_TEXT, "Hello".encodeUtf8())
        assertData("810548656c6c6f")
      }
    
      @Test fun serverCompressedTextMessage() {
        val serverWriter =
          WebSocketWriter(
            false,
            data,
            random,
            true,
            false,
            0L,
          )
        serverWriter.writeMessageFrame(OPCODE_TEXT, "Hello".encodeUtf8())
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

            maskCursor.close()
          }
        } else {
          sinkBuffer.writeByte(b1)
          sinkBuffer.write(payload)
        }
    
        sink.flush()
      }
    
      @Throws(IOException::class)
      fun writeMessageFrame(
        formatOpcode: Int,
        data: ByteString,
      ) {
        if (writerClosed) throw IOException("closed")
    
        messageBuffer.write(data)
    
        var b0 = formatOpcode or B0_FLAG_FIN
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  3. 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
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 22.1K bytes
    - Viewed (0)
Back to top