Skip to content

Document WebSocket 16 MiB outgoing queue limit (#8123)#9337

Open
Amir-yazdanmanesh wants to merge 1 commit intosquare:masterfrom
Amir-yazdanmanesh:document-websocket-max-queue-size
Open

Document WebSocket 16 MiB outgoing queue limit (#8123)#9337
Amir-yazdanmanesh wants to merge 1 commit intosquare:masterfrom
Amir-yazdanmanesh:document-websocket-max-queue-size

Conversation

@Amir-yazdanmanesh
Copy link
Contributor

  • Document the 16 MiB MAX_QUEUE_SIZE limit on WebSocket that silently closes the connection when exceeded
  • Add "Message Queue" section to the class-level KDoc explaining the limit, shutdown behavior (close code 1001), and recommended alternatives
  • Update send(text: String) KDoc to mention the 16 MiB limit (matching existing send(bytes: ByteString) docs)
  • Update queueSize() KDoc to highlight its use for backpressure monitoring

Test plan

  • ./gradlew :okhttp:compileKotlinJvm passes
  • Review rendered KDoc for clarity

Fixes #8123

Add KDoc explaining the MAX_QUEUE_SIZE behavior: when the outgoing
message queue exceeds 16 MiB, the web socket initiates a graceful
shutdown and send() returns false. Update send(text) and queueSize()
docs to mention the limit and backpressure monitoring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document WebSocket.MAX_QUEUE_SIZE

2 participants