subscribe

Bun

Symbol

ServerWebSocket.subscribe

subscribe(topic: string): void

Subscribes a client to the topic.

@param topic

The topic name.

ws.subscribe("chat");