feat: add concurrent connection limits
Signed-off-by: hgshreyas <hgshreyas.cs24@bmsce.ac.in>
This commit is contained in:
1 parent
1030109efa
commit
9e5e5cffe9
9 files changed
+28
-3
No files matched your search
@@ -56,6 +56,8 @@ function bunSocket(ws: BunServerWebSocket): WsSocket {
|
||||
* Serve a Green Tea app on Bun: HTTP + SSE via app.fetch, WebSocket via Bun's server-level
|
||||
* websocket handler. The ServerWebSocket only exists in open(), so per-connection state
|
||||
* (inbound channel, abort, WsRequest) is stashed on ws.data during the upgrade.
|
||||
* Bun.serve exposes no equivalent to Node's server.maxConnections; enforce connection caps at
|
||||
* the deployment platform or reverse proxy.
|
||||
*/
|
||||
export function serveBun(app: App, options?: BunServeShortOptions): BunServer {
|
||||
return Bun.serve({
|
||||
|
||||
Reference in new issue
Block a user