An hang
if (ShutdownflagA == FLAG_ON){
}
if (ShutdownflagB == FLAG_ON){
}
if (CloseflagA == FLAG_ON){
}
if (CloseflagB == FLAG_ON){
}
printf(„Pro gram is closed. Press any key. \n");
Dmykeyin = getchar();
WSACleanup();
return;
}
MELSEC System Q Ethernet-Module
nErrorStatus = shut down(socketnoA, 2);
ShutdownflagA = FLAG_OFF;
nErrorStatus = shut down(socketnoB, 2);
ShutdownflagB = FLAG_OFF;
nErrorStatus = closesocket(socketnoA);
CloseflagA = FLAG_OFF;
nErrorStatus = closesocket(socketnoB);
CloseflagB = FLAG_OFF;
Programmbeispiel für ein verbundenes Gerät
// Shut down pro cess ing (Sys tem A)
// Shut down flag OFF (Sys tem A)
// Shut down pro cess ing (Sys tem B)
// Shut down flag OFF (Sys tem B)
// Close pro cess ing (Sys tem A)
// Con nec tion end flag OFF (Sys tem A)
// Close pro cess ing (Sys tem B)
// Con nec tion end flag OFF (Sys tem B)
// Wait ing for key input
// Winsock.DLL release
A - 67