UPnP in libpurple

Will Thompson will at willthompson.co.uk
Wed Jul 9 20:00:13 EDT 2008


On 08/07/08 03:24, Mark Doliner wrote:
> On Mon, Jul 7, 2008 at 7:05 PM, Ryan Govostes <rgovostes at gmail.com> wrote:
>> A problem we're facing is that NAT-PMP has long timeouts. For
>> instance, when we try to get our public IP address, the timeout is 128
>> seconds, even if the router doesn't support NAT-PMP! Since the
>> function to get the IP blocks while we wait for the response, my
>> implementation cannot realistically follow spec.
>>
>> How can we change this to be asynchronous?
> 
> libpurple isn't multi-threaded, so I think NAT-PMP would need to
> support asynchronous function calls and would itself need to be
> non-blocking.  Then you would need to integrate it with libpurple's
> eventloop code, which could be a little tricky, and could also be a
> lot of work.

Or maybe the code that does blocking DNS lookups in a child process
could be reused? That would avoid having to modify libnatpmp.

-- 
Will

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://pidgin.im/pipermail/devel/attachments/20080710/df20e220/attachment.sig>


More information about the Devel mailing list