Hi,
Is there any equivalent of FD_CLOSE message for blocking sockets ?
I want to check if other side has closed...
Thanks.
Is there any equivalent of FD_CLOSE message for blocking sockets ?
I want to check if other side has closed...
Thanks.
Try:
Untested, but it might work. Of course the best way to check for this is to check the return values of your normal send's and recv's.
invoke recv,hSock,addr tmp,0,MSG_PEEK
.if eax==0
; The socket was "gracefully closed"
.elseif eax==SOCKET_ERROR
; Some other error, use WSAGetLastError
.endif
Untested, but it might work. Of course the best way to check for this is to check the return values of your normal send's and recv's.