hoaproject / Websocket

The Hoa\Websocket library.
https://hoa-project.net/
423 stars 75 forks source link

Connected clients on the server id #85

Closed moirrer closed 7 years ago

moirrer commented 8 years ago

Is there a way to get a list/$buckets/bucket_id from all current connected clients? Trying to do an implementation where once client #1 sends a message the server sends another to clients #2 and #3, so is not a broadcast and not to origin. Can I accomplish that with HoaWebsocket?

Hywan commented 8 years ago

Hello @moirrer,

Yes, this is possible. You have the broadcastIf method, or you can grab all the connections at once with $server->getConnection->getNodes().

Hywan commented 7 years ago

@moirrer Is your question answered?

moirrer commented 7 years ago

Yes, thanks so much.

Hywan commented 7 years ago

Thanks!