I know that read() is a blocking call unless I make the socket non-blocking. So I expect read() call which requests 4K of data should return a positive value ( no of bytes r
When a TCP connection is closed on one side read() on the other side returns 0 byte.