Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hmmm... use two TCP sockets?


You've missed the point. It's not about "I can't do things with TCP". It's that BSD's networking implementation, which modern Unix networking is based on, broke the "everything is a file" philosophy of Unix. Instead of using the existing file descriptor interface, they created a new socket interface, which is logically 2 file descriptors. However, it's not actually 2 file descriptors, so you now need a bunch of device-specific code.


As others have said, it wasn't a valid point to begin with. A file open for reading and writing is too "logically 2 file descriptors", yet it's a single fd, just like a socket.


not to argue, but you can open an fd for reads and writes on unix on a normal file. A socket is not logically 2 file descriptors.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: