Good day.
Trying to deal with sockets on go.
How to identify a specific connection?
For example, one user gives the server the following request:
{action:message,from_id:111,to_id:222,message:'Привет. Как дела?'} The server should reply {status:true} and go through all the connected users, find the user id 222 and send this particular message to him.
I use an example from here . With packages from here . But here is a general chat. It is necessary to somehow filter from whom and to whom to send data. How to do it?
Thank.