Reconnection of Client when server reboots in WebSocket

Я использую веб-сокет, используя PHP5 и браузер Chrome в качестве клиента. Я взял код с сайта http://code.google.com/p/phpwebsocket/ .

Я запускаю сервер, и клиент тоже подключен. Я тоже могу поболтать. Теперь, когда я перезапускаю сервер (убивая его и запуская снова), client gets the disconnected information, but automatically doesn't reconnect with server when I send the message.

How to achieve this? Like when I get the dis-connected information, should I check it and send it to JavaScript to refresh the page or reconnect?

85
задан siddhusingh 26 November 2017 в 06:39
поделиться