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
I have a PHP daemon that listens to UDP and ZMQ traffic in a non-blocking way - I use stream_select() on both the UDP listening socket and the ZMQ socket (the ZMQ extension happily provides the underlying socket FD so we can just add it to the select() arrays).
My daemon also runs jobs once every second, so using stream_select() with a timeout is very flexible, I can process ZMQ and UDP as soon as someething is there to read without waiting for the timeout to expire, yet run jobs every second without a problem.
I understand that there used to be a ->getSocket() method on the $connection in the AMQP lib, but it's apparently gone.
How can I add the AMQP lib's socket to the select() pool so I can gracefully listen to UDP, ZMQ, AMQP and maintain the flexibility of stream_select() ?
I understand that there are mechanisms in the AMQP lib to do that just with the AMQP sockets, but I also need to react swiftly to my other connections such as UDP and ZMQ.
This discussion was converted from issue #1206 on January 06, 2025 17:23.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a PHP daemon that listens to UDP and ZMQ traffic in a non-blocking way - I use stream_select() on both the UDP listening socket and the ZMQ socket (the ZMQ extension happily provides the underlying socket FD so we can just add it to the select() arrays).
My daemon also runs jobs once every second, so using stream_select() with a timeout is very flexible, I can process ZMQ and UDP as soon as someething is there to read without waiting for the timeout to expire, yet run jobs every second without a problem.
I understand that there used to be a ->getSocket() method on the $connection in the AMQP lib, but it's apparently gone.
How can I add the AMQP lib's socket to the select() pool so I can gracefully listen to UDP, ZMQ, AMQP and maintain the flexibility of stream_select() ?
I understand that there are mechanisms in the AMQP lib to do that just with the AMQP sockets, but I also need to react swiftly to my other connections such as UDP and ZMQ.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions