Revamp of EOF handling in all network connections, pipes and other