everyone, i want to know when my tcp connection will be finished. I mean the next: my prog is a client and it sends any messages to server, but it doesn't know when the server will close connection (send FIN flag). Its look like handshake, prog send first msg, then receive and send next msg on the same socket, then serv send FIN - flag, thats mean end of tcp session or end of handshake as you like. My target is to know when server say FIN, im using stream socket.
I tryed to use var flags from msdn doc int recv(SOCKET s ... int flags);
. But now i think it isnt what im looking for...
int partresult = recv(*my_sock, RcvBytes, Size, 0);