I am trying to send a message to a WebSocket by referencing it's specific connection, which I maintain in a map of map[*websocket.Conn]bool
. I do not want to broadcast the message using a channel but instead want to send a direct message to a specific connection.
(godebug) p clients.conn
map[*websocket.Conn]bool{(*websocket.Conn)(0xc420126000):true, (*websocket.Conn)(0xc4200f86c0):true}
I have opted out of Gorilla for now and am using the x/net/websocket
sub-repository.
Any tips would be appreciated.