From 8c75c777c2ffa418b18f313fcde23df4c147e964 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Tue, 28 Jan 2025 00:56:56 -0800 Subject: [PATCH] Update http.md --- docs/api/http.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: