You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way on the client side to transfer user_id (user ID registered on the site) and referrer (address of the page from which the connection was made) to the server, so that each connection can be checked for user_id and referrer?
The text was updated successfully, but these errors were encountered:
I use:
$channel_server = new Channel\Server('0.0.0.0', 2347);
it sends messages to all users, as if I need to send messages only to users who are connected from the page mysite.com/page_1, while not sending messages to users connected from mysite.com/page_2.
It should roughly look like this:
foreach($worker->connections as $connection) {
if($connection->get('page') != 'page_1') continue;
$connection->send($data);
}
but how to pass 'page' in $connection when connecting? Do you have an example?
Is there a way on the client side to transfer user_id (user ID registered on the site) and referrer (address of the page from which the connection was made) to the server, so that each connection can be checked for user_id and referrer?
The text was updated successfully, but these errors were encountered: