[gnet-dev] Asynchronous DNS query when nonblocking query is possible



Hello,

One year later I sent a message regarding using uDNS in GNET, I'm really
writing it. I would really like to finish it and get it included in
GNET.

So, I would like to do things right, increasing its acceptance.

The first thing I am working on is getting nonblocking queries (those
with a decimal dot notation address instead of a real DNS name) not to
dispatch a new thread or process.

However, that woul require calling the callback function before even
returning the new_async functions. Would that be a problem? Which
AsyncID should I return? I've noticed that AsyncID is, in fact, a
pointer to a State, and it seems applications are responsible not to
call cancel when the callback function was already called (when state
would be freed). So, returning a NULL ID would be the right way, since
cancel would also return without failure even in case the application
called cancel.

I would like a positive answer here, so I can go on and send my first
patch.

Thanks,
Thadeu Cascardo.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]