Re: LANANA: To Pending Device Number Registrants

H. Peter Anvin
2001-05-15T19:23:55Z

Linus Torvalds wrote:
>
> But no, I don't actually like sockets all that much myself. They are hard
> to use from scripts, and many more people are familiar with open/close and
> read/write.
>

I always thought it was really strange that I couldn't open() a AF_UNIX
socket in order to write() to it (as a stream socket, of course.) It
really makes a lot of things harder to do than it needs to be, and I
would still like to see this generalization done.

That being said, if USB exported a filesystem I don't see any good reason
why you shouldn't be able to advertise "socket" (S_ISSOCK()) objects and
simply have them accept open("/dev/usb/blah/blah") instead of
connect(AF_USB, ...) -- and still use send() and recv() where it is more
appropriate to do so than using read() and write().

-hpa

--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."