Exemple

//------------------------------------------------------------------- // ECLConnection::Refresh // // Loop-and-wait until connection 'B' is started. //------------------------------------------------------------------- void Sample25() { ECLConnection *Info; // Pointer to connection object ECLConnList ConnList; // Connection list object int i; printf("Waiting up to 60 seconds for connection B to start...\n"); for (i=0; i<60; i++) { // Limit wait to 60 seconds ConnList.Refresh(); // Refresh the connection list Info = ConnList.FindConnection('B'); if ((Info != NULL) && (Info->IsStarted())) { printf("Connection B is now started.\n"); return; } Sleep(1000L); // Wait 1 second and try again } printf("Connection 'B' not started after 60 seconds.\n"); } // end sample