We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
need more explaine about "push" function. i cant undrestant this line
$pusher->push(['my_data' => 'data'], 'user_notification', ['username' => 'user1']);
please review the readme.md
The text was updated successfully, but these errors were encountered:
['my_data' => 'data'] = Payload user_notification = name of your PubSub route ['username' => 'user1'] = params for your PubSub route (if needed)
['my_data' => 'data']
user_notification
['username' => 'user1']
example:
Let's say i have app_topic_chat PubSub route in my yaml file:
app_topic_chat: channel: 'conversation/{conversationId}' handler: callback: 'conversation.topic' requirements: conversationId: pattern: '\d+'
My push action for that topic will be something like this:
$this->_pusher->push($payload, 'app_topic_chat', ['conversationId' => 1]);
If you use let's say ZMQ pusher then your topic MUST implement PushableTopicInterface
PushableTopicInterface
use Gos\Bundle\WebSocketBundle\Topic\PushableTopicInterface;
And that interface will force you to add new method in your topic handler
public function onPush(Topic $topic, $request, $payload, $provider) { $topic->broadcast(json_encode($payload)); }
Sorry, something went wrong.
thank you stipic. but by all this, i cant send a message to specific user and only receive default broadcast like
Received message 936 has left foor/bar
how can i sent msg from my controller to pusher?
i try (like this)
$pusher->push(['data' => 'data'], 'user_notification', ['conversationId' => 939]);
and i get
Library error: connection closed unexpectedly - Potential login failure.
No branches or pull requests
need more explaine about "push" function. i cant undrestant this line
please review the readme.md
The text was updated successfully, but these errors were encountered: