[nanomsg] Re: On the use of small integers instead of pointers to identify "sockets"

  • From: Amaury Bouchard <amaury@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Thu, 5 Sep 2013 15:42:36 +0200

2013/9/5 Paul Colomiets <paul@xxxxxxxxxxxxxx>

> I think it's too slow for the use case. But anyway how would you do
> that? Should socket pretend that it's a file? It's impossible to
> select/poll on file, so that kills the whole idea.
>

Honestly, I don't know. I wrote a basic filesystem during my studies 13
years ago, and I would have been happy to use FUSE instead of hacking the
kernel. But I don't know FUSE that much.
Sockets prents to be files; even if you don't open them with open(), you
can use read/write/close system calls to handle them.
More, it seems that FUSE supports poll() =>
http://www.cs.hmc.edu/~geoff/classes/hmc.cs135.201001/homework/fuse/fuse_doc.html#function-purposes

Maybe FUSE would be too slow, I don't know. It could be a good proof of
concept, before creating a kernel module (which would take more time to do,
and need to be done for each OS).

Other related posts: