<URL: http://bugs.freeciv.org/Ticket/Display.html?id=21635 >



----- Original Message Follows -----
From: "Christian Prochaska"
<[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: (PR#21635) PATCH - asynchronous DNS core (and a few
other things...) 
Date: Thu, 5 Oct 2006 08:49:49 -0700

> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=21635
> >
> 
> > [book - Do 05. Okt 2006, 01:29:44]:
> > 
> > - my_nonblock made to work on win32 (by using
> >   ioctlsocket if HAVE_WINSOCK is defined).
> > 
> 
> I made a similar patch in PR#19481 which covers some more
> places where errno got evaluated after a socket function
> call (which doesn't work with Winsock). Perhaps you'd like
> to merge these additional changes into your netintf patch?

It is easy now to change the places where errno is checked
to the appropriate
wrapper (my_socket_would_block,
my_socket_operation_in_progess, my_errno).

I'm not sure about the places EINTR is checked for, is it
really ok to ignore that
error? (If yes I suppose my_socket_operation_was_interrupted
or some such should be
made).

As for checking errno for printing an appropriate message
mystrerror should be used,
or a similar translation function (that would do the right
thing depending on the
platform).

I think wrapper functions would be a better approach than
besprinkling the code with
#ifdefs, of course you maintainers know best :).

Actually we did all this for warclient already when I wrote
an asynchronous
(i.e. non-blocking) network system (as proof of concept I
made downloading the
metaserver list asynchronous in the client - it is in the
warclient 2.0 unstable
branch). The problem was that the giochannel implementation
on win32 was flaky.
Yaro made a patch for glib which seemed to fix the problem
(submitted to gnome
bugtracker http://bugzilla.gnome.org/show_bug.cgi?id=357674)
but it has not been
processed yet. Rather than forcing people on win32 to use
our patched glib we
decided to hold off rewriting more of the annoying blocking
network code (e.g.
metaserver send/recv) in wait of a better solution. :/

By the way, what is ftwl?



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to