Content-Type: multipart/alternative; boundary=Apple-Mail-1--267364131 --Apple-Mail-1--267364131 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Apr 3, 2007, at 9:44 AM, Daniel Atallah wrote: > On 4/3/07, Mark Doliner wrote: > Of course, it would be best if upnp and pmp are non-blocking and > Gaim could > talk to your router in the background shortly after startup while your > accounts are merrily logging in. > > The upnp stuff is non-blocking. The majority of upnp is non-blocking, but gaim_upnp_discover() says: > /* TODO: Non-blocking! */ > if((hp = gethostbyname(HTTPMU_HOST_ADDRESS)) == NULL) { and is called by gaim_upnp_get_public_ip() the first time it's used. The pmp stuff is blocking, though its blocking operations are specifically limited to 0.25 seconds in duration (pending being nonblocking, which I haven't done any work on yet but will look at eventually if someone - preferably someone who has actual experience writing nonblocking sockets code - doesn't beat me to it). For the record, I've never seen a significant delay as a result of either block of code... but I noticed that it was being done when I was working in network.c and was surprised that the public IP was determined long before it was ever needed and might never be used at all. -Evan --Apple-Mail-1--267364131 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1
On Apr 3, 2007, at = 9:44 AM, Daniel Atallah wrote:

On 4/3/07,=A0Mark Doliner=A0<mark@kingant.net> wrote:
Of course, it would = be best if upnp and pmp are non-blocking and Gaim could
talk to your = router in the background shortly after startup while your
accounts = are merrily logging in.

The upnp stuff is = non-blocking.=A0

The majority of upnp is non-blocking, but = gaim_upnp_discover() says:
/* TODO: = Non-blocking! */
if((hp =3D gethostbyname(HTTPMU_HOST_ADDRESS)) =3D=3D = NULL) = {

and is called by = gaim_upnp_get_public_ip() the first time it's used.

The pmp stuff is blocking, = though its blocking operations are specifically limited to 0.25 seconds = in duration (pending being nonblocking, which I haven't done any work on = yet but will look at eventually if someone - preferably someone who has = actual experience writing nonblocking sockets code - doesn't beat me to = it).

For the = record, I've never seen a significant delay as a result of either block = of code... but I noticed that it was being done when I was working in = network.c and was surprised that the public IP was determined long = before it was ever needed and might never be used at all.

-Evan
= --Apple-Mail-1--267364131--