Detect TCP client disconnect

Hi Hein,
it is a good example which make clear how handle API return code.
My problem is however not solved. I opened a new tread which has a better title and explanation.