I am creating socket server. But I do not know, How I can know client disconnected or not? I am creating server under Windows and using berkeley sockets function (read, send, connect....). Preferably I want a cross-platfomennoe solution (without WSA functions).
I can write to socket 0 byte and ckeck error. But it is not good solution.