Ok so here is how things are going:
[Server] Start
[Server] Socket.AcceptConnection
[Client] Start
[Client] Socket.Connect
[Server] Receive //blocking
[Client] Send
[Server] Print
[Server] Receive
[Client] Close socket
Is there any way to know when the client as closed the connection? I am currently using the fake packet trick as described on MSDN where on a separate thread I do a
[Server] socket.Send(byte[], 0,0);
And I check if it throw any error but it does not, even if the client as closed the socket.
P.S. I am actualy thinking, might it be a problem if I have a socket on the server side (TCP) and a TcpClient on the client side?
Thank you.