Mathias Dahl <[EMAIL PROTECTED]> writes:
>> Does (make-network-process :name "http" :buffer "http-localhost"
>> :host "127.0.0.1" :service 80
>> :nowait t)
>> work?
>
> I get no error but it returns `nil'. I guess it should return a
> process object, right?
Yes. Does it work with hosts other than localhost?
The direct cause of the `nil' return value is this code in process.c:
if (s < 0)
{
/* If non-blocking got this far - and failed - assume non-blocking is
not supported after all. This is probably a wrong assumption, but
the normal blocking calls to open-network-stream handles this error
better. */
if (is_non_blocking_client)
return Qnil;
This seems to be a bug of some sort. The documentation doesn't
mention that make-network-process might ever return nil. I see four
possible solutions; someone who knows Windows should look at this.
1. Make non-blocking connections work on Windows.
2. Make (featurep 'make-network-process '(:nowait t)) return nil on
Windows.
3. Document that make-network-process returns nil if it fails to
create a non-blocking socket.
4. Make make-network-socket do a blocking connect if a non-blocking
connect fails, and document that.
Magnus
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug