TsgcWebSocketServer | Server Keep Active

서버가 시작된 후, 때때로 어떤 이유로든 중지될 수 있습니다. 예기치 않은 종료 후 서버를 재시작하려면 WatchDog 속성을 사용할 수 있습니다.

 

WatchDog

WatchDog가 활성화된 경우 서버가 종료를 감지하면 WatchDog는 서버가 다시 활성화될 때까지 X초마다 다시 시작하려고 시도합니다.

 

예제: 예기치 않은 중지 후 무제한 시도로 10초마다 다시 시작합니다.

 


oServer = new TsgcWebSocketServer();
oServer->WatchDog->Interval = 10;
oServer->WatchDog->Attempts = 0;
oServer->WatchDog->Enabled = true;
oServer->Active = true;