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
Ratchet push messaging without implementing WampInterface #433
Comments
You can use websocket client (see: Pawl ) to push messages to server. As for authentication you could have login system with symfony sessions and check session variable on server. For pawl connection check some headers, origin for example.
|
@krekk4 thanks!.
And this is my server message: |
Change |
@cboden , I think i can get this example to work. I have a few questions Is there something very inefficient using pawl than the one posted by you in the website under push integration(which uses zeromq) ? how do I verify that the command sent from my server with some message to certain topics is indeed from my server? |
With the release of v0.4 I plan on updating the push tutorial to use Pawl instead of ZeroMQ just so developers getting into async land don't have to install a foreign extension, so you're good. When I wrote that tutorial Pawl didn't exist yet and the RFC protocol handler wasn't nicely decoupled yet so ZMQ was easier to write. If you're looking for security to ensure the message came from your script, off the top of my head you could do one of these two things:
|
@cboden , thanks!. I am just curious to know why my code is not working though. Since I have already set up zmq (and I don't know how to do number 1 of your previous answer). Is it possible to use zmq exactly the way you have written in your website along with MessageComponentInterface ? Thank you very much in advance. |
just check $conn->remoteAddress on server should be 127.0.0.1 for pawl connection |
@krekk4 , could you please tell what is that line is doing ? |
|
@krekk4 , @cboden . |
@krekk4 , I used your code. The server code that I'm using now is :
What could be the issue here ? |
What exactly are u trying to do? |
dont know why i follow ratchet...m stucked |
I want to implement MessageComponent interface and push notification.(The tutorial in ratchet has WampInterface for push). I do not want to use WampInterface as it is in v1 and there are no libraries for that version for iOS.
I am using this in Laravel, and this was my first try:
I have a pusher server where I will be handling my own 'topics' and clients.
An example that I tried(that doesn't work) to push data from server to some topic:
How do I make push notification work (my server should be able to send message to client) without implementing WampInterface (and just MessageComponentInterface).
I would also like to ask how to send authentication details on connection so that my server can close the connection if its invalid(and not have an idle connection open)
The text was updated successfully, but these errors were encountered: