-
I'm almost embarrassed to ask this, as I know the answer is going to be obvious....but suppose I have 10 clients connected to the websocket server, but I only want to send a message to client 4 and 9. Where is the data stored that distinguishes between connections. I'm guessing there's a connection id somewhere? Or is there some built in component that I'm overlooking that handles this (like rooms)? I see the following in one of the examples:
Is PerSocketData struct prepopulated with this data, or are we to create this ourselves, and if so what values (and how do we obtain them) should we use to distinguish between users? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You are given a reference to a connection when said connection is established. How you mark or store this reference is up to you (do you expect some kind of JWT to log it in? Or do you expect some user name, etc?). You send using those references, as you wish. |
Beta Was this translation helpful? Give feedback.
You are given a reference to a connection when said connection is established. How you mark or store this reference is up to you (do you expect some kind of JWT to log it in? Or do you expect some user name, etc?). You send using those references, as you wish.