News for hackers. Stuff that matters.
Re:Introduction to TCP and Sockets (2001) by WJW on Wednesday July 20, 2022 @03:25AM (#32162594)
TCP connections also have 2 file descriptors, they are just on different computers. It seems quite natural to me to think of a socket as two pipes joined together.

As with so many things in computing the abstraction leaks a bit when you get deeper into it but as a first intuition for beginners I think you could do way worse than "a socket is a bidirectional pipe to another computer".

I'm intrigued by your idea of making 2 file descriptors for each socket btw. Why would it be such an improvement in your opinion?

There are no comments on this comment yet.