diff --git a/docs/api/http.md b/docs/api/http.md index 22db37bcaa..7a09952a31 100644 --- a/docs/api/http.md +++ b/docs/api/http.md @@ -677,6 +677,8 @@ const server = Bun.serve({ }); ``` +## WebSocket Configuration + ### server.publish(topic, data, compress) - WebSocket Message Publishing The server can publish messages to all WebSocket clients subscribed to a topic: @@ -702,8 +704,6 @@ The `publish()` method returns: - `0` if the message was dropped - `-1` if backpressure was applied -## WebSocket Configuration - ### WebSocket Handler Options When configuring WebSockets, several advanced options are available through the `websocket` handler: