if (ShutdownflagA == FLAG_ON){
nErrorStatus = shutdown(socketnoA, 2);
ShutdownflagA = FLAG_OFF;
}
if (ShutdownflagB == FLAG_ON){
nErrorStatus = shutdown(socketnoB, 2);
ShutdownflagB = FLAG_OFF;
}
if (CloseflagA == FLAG_ON){
nErrorStatus = closesocket(socketnoA);
CloseflagA = FLAG_OFF;
}
if (CloseflagB == FLAG_ON){
nErrorStatus = closesocket(socketnoB);
CloseflagB = FLAG_OFF;
}
printf("Program is closed. Press any key. \n");
Dmykeyin = getchar();
WSACleanup();
return;
}
// Shutdown processing (System A)
// Shutdown flag OFF (System A)
// Shutdown processing (System B)
// Shutdown flag OFF (System B)
// Close processing (System A)
// Connection end flag OFF (System A)
// Close processing (System B)
// Connection end flag OFF (System B)
// Waiting for key input
// Winsock.DLL release
APPENDICES
A
417