mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
Adds a new getSubscriptions getter to ServerWebSocket that returns an array of all topics the WebSocket is currently subscribed to. Implementation details: - Added getTopicsCount() and getTopics() methods to uWS WebSocket.h - Created uws_ws_get_topics_as_js_array() in libuwsockets.cpp that constructs a JSArray directly using JSC APIs, avoiding Zig FFI complexity - Uses iterateTopics() internally to populate the array - Exposed as a getter property in server.classes.ts - Added comprehensive test coverage The getter returns an empty array when there are no subscriptions.