3 ms·
netcat doesn't "solve" this unix design problem any better than the author's own programs, tcpserver and tcpclient [0], solve it. djb's argument here is that T
by sigil 13y ago
netcat doesn't "solve" this unix design problem any better than the author's own programs, tcpserver and tcpclient [0], solve it.
djb's argument here is that TCP sockets are more like pipes, with separate read and write buffers, and separate read-side and write-side close operations. This makes sense, but what about UDP sockets? What about operations that apply to the socket as a whole, like bind(2), listen(2) or ioctl(2)?
[0] http://cr.yp.to/ucspi-tcp.html http://cr.yp.to/ucspi-tcp.html
- theoh 13y agoPlan 9 doesn't separate the read and write fds, but does provide a separate ctl file to replace ioctl. This may be a cleaner approach: control signals are no longer "in band" operations on the data fd (or fds). Logically it seems better to have a single fd representing a full-duplex connection, and expecting the programmer to keep track of the connection state (or possibly receive an error if they don't)
- jfb 13y agoThis makes me long for a djb vs. Linus flamewar. Well, no, not really, because that would be counter-productive, but man, it'd sure be epic.
- aidenn0 13y agoGetting completely off topic now, but I would actually pay money to read the spectate that. We just need to find something they disagree about that they also both care enough about to rant at each other for.