Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple connection to one user? #1044

Open
mumus opened this issue Aug 1, 2024 · 1 comment
Open

Multiple connection to one user? #1044

mumus opened this issue Aug 1, 2024 · 1 comment

Comments

@mumus
Copy link

mumus commented Aug 1, 2024

Hello. Please tell me, I use Workerman in my web application to send server notifications to clients. I don't understand how to solve this problem:
The user came from a PC, logged in to the site and connected to the web socket via a link like this:
wss://mysite.com:1234?Username=User.
Then he logged in to the site via phone, and I allow the previous session on the computer not to end.
Therefore, he has the same link where Username=User.
But notifications are sent only to the last connected web socket.
It is possible to union connections with one Username?

@akotulu
Copy link
Contributor

akotulu commented Sep 13, 2024

No, you need to implement a dispatch system which sends messages to connected clients. Eg separate WS connections to dictionary which where connected as you described and send message to those connections only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants