websocket
websocket copied to clipboard
Extending the chat example to have multiple rooms
If I wanted to extend the chat example to support multiple rooms, am I correct to assume I will have to modify the incoming messages data structure to support a key -> channel type structure? i.e. a map of string to channel?
https://github.com/gorilla/websocket/blob/master/examples/chat/hub.go#L14
I will also need to keep track of client to room also in another map.
See #46.
Thanks gary!