PHP で永続的なソケット接続を設定する必要がありますが、これを実現する方法がわかりません。現在、SMS メッセージを送信するときは、a) ソケット接続を開きます b) (SMS/SMPP 経由で) メッセージを送信し、c) ソケット接続を閉じます
ただし、常に接続を開いたり閉じたりする必要はありません。むしろ、私は要求します
- 2 persistent connections that maintains connectivity to an SMSC (SMS centre) and reconnects when a timeout occurs.
- One persistent connection for reading SMS and one for sending SMS.
- Automatic restart/recovery (i.e. when memory issues arise)
- Automatic looping to act as listener for incoming events such as receiving incoming delivery receipts and sms messages, as well as 'ping' (enquire link) to keep SMPP connection alive.
更新:誰かが次を使用して上記を達成したかどうか疑問に思っていました: https://github.com/shaneharter/PHP-Daemon