Subject: Re: AfterSocketCreationFuncPtr

Re: AfterSocketCreationFuncPtr

From: Gregor Jasny <jasny_at_vidsoft.de>
Date: Thu, 27 Nov 2008 12:32:31 +0100

Daniel Stenberg wrote:
> On Thu, 27 Nov 2008, Gregor Jasny wrote:
>
>> 2. AfterSocketCreationFuncPtr
>>
> We have something similar in libcurl too, as it allows for applications
> to set
> socket options or whatever that is specific to the surroundings or
> requirements of the app.
>
> However, I think the simple use shown in the above mentioned diff is a
> bit too
> simple:
>
> * I would like to have the callback able to fail the operation by
> returning
> an error code
>
> * I would like the callback to work on both UDP and TCP sockets
>
> * I would like the callback to get some private context pointer passed in
> from the app as callbacks without any such so often will have to rely on
> global variables etc soon when they need app-specific data to work with.
>
> None of these changes would remove any features from resiprocate, but it
> would
> cause a slightly different API.

I'll try to build a patch, but won't be able to do so before Sunday.

Thanks,
Gregor
Received on 2008-11-27