News for hackers. Stuff that matters.
Re:Each socket should have two file descriptors by LukeShu on Sunday July 21, 2013 @07:04PM (#6080741)
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.
Re:Each socket should have two file descriptors by eps on Sunday July 21, 2013 @09:04PM (#6081206)
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.
Re:Each socket should have two file descriptors by drudru11 on Monday July 22, 2013 @06:29PM (#6086895)
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.