Subject: RE: socket callbacks

RE: socket callbacks

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 27 Jun 2012 23:12:46 +0200 (CEST)

On Wed, 27 Jun 2012, Fredrik Jansson wrote:

> "ares_set_sockopt_callback" seems like a good name.
>
> I no one objects, let's decide on that name.
>
> What did you have in mind for the opensocket cb? Anything I can fix while I
> am at the sockopt cb?

It might be an idea to _just_ make it an opensocket one. In your case you
could easily have the callback do socket() and then the sockopts you need...

But regarding an opensocket callback, what exactly would that be used for? The
reason I'm asking is that if you want to be able to pass in a socket that is
already for exampled tunneled over some other medium you may want to tell
c-ares to _not_ do the connect() afterwards or similar.

I figure an opensocket callback would need a corresponding closesocket version
as well.

-- 
  / daniel.haxx.se
Received on 2012-06-27