python-websockets/websockets

Cannot Send message to a single client.

suryanarayanan-rently opened this issue · 0 comments

Hi There,
Thanks for making this awesome library and I have started to test this on a sample project last week. In my project, I was able to broadcast a message. But I would like to send messages specifically to one client.

Example: Consider it's a chat app. Person a wants to send a message to person b.

In my project, I am not storing individual Websocket objects for each connections as mentioned in some examples. Instead I only store the remote address and id of the Websocket client in Redis. Using the stored information, I cannot create a Websocket object to send message.

I looked for answers in stack overflow and documentation, but I couldn't find anything.
So, it would be a great help if someone can provide the solution.