От: | Nikolay_Ch | ||
Дата: | 23.09.13 17:14 | ||
Оценка: |
1) Call WSAEventSelect to register for FD_CLOSE notification.
2) Call shutdown with how=SD_SEND.
3) When FD_CLOSE received, call the recv or WSARecv until the function completes with success and indicates that zero bytes were received. If SOCKET_ERROR is returned, then the graceful disconnect is not possible.
4) Call closesocket.