Closed quyunet closed 1 year ago
Why would you need to keep sessions alive? Usually It should be like
If you'd like to keep sessions alive, you need to keep in mind that the longest time a connection will be kept alive is the duration of your script execution... so if you have long running loop and you need the connection to be alive, your best bet would be:
//...
$hello = new Hello();
//...
while($loong_loop){
//.. loooon loop
$client->request($hello); //will do hello every loop iteration
}
//now do your stuff
Out of scope for now. I would not keep connections alive but instead make use of a queue/worker system.
how to use hello Keeping sessions alive?
https://github.com/AfriCC/php-epp2/blob/master/src/AfriCC/EPP/Frame/Hello.php
can provide the code example?