mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Update http.md
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user