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

How to broadcast message #148

Open
mitmelon opened this issue Aug 6, 2021 · 2 comments
Open

How to broadcast message #148

mitmelon opened this issue Aug 6, 2021 · 2 comments

Comments

@mitmelon
Copy link

mitmelon commented Aug 6, 2021

How does the server receive a message and broadcast to all connected clients...

  1. How do you authenticate a client before allowing connections?
@sirn-se
Copy link
Contributor

sirn-se commented Aug 6, 2021

The current server is single connection. Use receive() to receive messages, and any of the send methods to send messages to connected client: https://github.com/Textalk/websocket-php/blob/master/docs/Server.md#sending-messages

Multi connection support is planned for v1.6.

This library only concerns reading/writing over websocket. Any application logic need to be built on top of it.

@mitmelon
Copy link
Author

mitmelon commented Aug 6, 2021

Ok thanks... Waiting for the update... Then...

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

No branches or pull requests

2 participants