Hrvoje Niksic <hniksic(a)srce.hr> writes:
wmperry(a)aventail.com (William M. Perry) writes:
> I think being able to add an arbitrary file descriptor to the event
> loop would be really useful. We could get rid of the
> select_process() cruft in the event loop and just use the generic
> interface.
You're right. Except that I wouldn't want elisp to deal with "file
descriptors" -- they are a Unixish concept that shouldn't escape to Lisp.
Well, I think being able to get at the underlying socket descriptor would
be really useful. You cannot do a SOCKS or HTTP CONNECT replacement for
'open-network-stream' without it. There is no way to do the equivalent of
'ungetc' so that the real process filter or whatever the calling app wants
to use sees all the data. But that is a whole other discussion. :)
The Lisp programmer should be able to add "selectable
objects" (like
processes or LDAP objects or whatever) to the event loop, so that events
get generated when the process is readable or writable or whatever.
I don't know if we would need to expose this at all at the lisp level. I'm
just thinking it would make life easier for people doing C level stuff.
Instead of having a whole slew of 'console_select_XXX' functions, we would
just have one.
We could use this to finally implement listening sockets in Emacs lisp. :)
-Bill P.