xmpp
xmpp copied to clipboard
Maintain persistent connection - question
Hi @fabiang, Is there a possibility to make persistent connection? Currently, when I send message and receive response, it's automatically disconnected. Can I prevent it and keep connection alive? Thanks!
Looking for the same answer. My PHP api script ends after each call, each new call is separate process, so this is really a PHP question how to maintain a thread which does the XMPP communication while other PHP scripts are 'giving' it what to do.
That's exactly what I was just looking to do. In my case, I'm using Laravel, so can spin up a queue worker that should be able to maintain a connection and send messages as needed.
You'll definitely need some kind of CLI script to maintain a persistent connection like that.
@bram1028 can u please explain how to make persistent connection with laravel?