Re: apr_socket_data_set

2005-02-28 Thread Cliff Woolley
On Sun, 27 Feb 2005, Luca Renzi wrote: I'm a student and I need to use apr_lib for a little project. The question is: I don't understand what are data and key parameter for the function apr_socket_data_set. Could somebody explain? Several APR data types include a userdata member

apr_socket_data_set

2005-02-27 Thread Luca Renzi
Hi, I'm a student and I need to use apr_lib for a little project. The question is: I don't understand what are data and key parameter for the function apr_socket_data_set. Could somebody explain? Thank you Luca ___ Nuovo Yahoo! Messenger: E

[PATCH] some progress with apr_socket_data_get()/apr_socket_data_set()

2003-04-16 Thread Jeff Trawick
You may have known that socket data is implemented as pool userdata in a manner that prevented multiple sockets from the same pool being able to use the same key for socket data. Another problem is that any cleanup specified in the call to apr_socket_data_set() is run when the pool is cleaned

Re: [PATCH] some progress with apr_socket_data_get()/apr_socket_data_set()

2003-04-16 Thread Jeff Trawick
problem is that any cleanup specified in the call to apr_socket_data_set() is run when the pool is cleaned up, not when the socket is destroyed (in contradiction to the doc). Err, yeah, why is it pool_userdata at all? I'm confused. Isn't using pool's userdata *way* overkill for this? Can't

Re: [PATCH] some progress with apr_socket_data_get()/apr_socket_data_set()

2003-04-16 Thread Justin Erenkrantz
--On Wednesday, April 16, 2003 8:14 AM -0400 Jeff Trawick [EMAIL PROTECTED] wrote: The context where I see this as useful is with utility routines (e.g., support libraries) that perform operations using the socket but don't have any leeway in how the app uses pools. (This is a natural for an

Re: [PATCH] some progress with apr_socket_data_get()/apr_socket_data_set()

2003-04-16 Thread Allan Edwards
Justin Erenkrantz wrote: Store that key in the apr_socket_data? Another cheesy idea may be to use a linked list with the key in the structure. I'm just really thinking that for the general case, a key/value backing (like a hash) is overkill. I'm just not clear this is going to be more than 2

Re: [PATCH] some progress with apr_socket_data_get()/apr_socket_data_set()

2003-04-16 Thread William A. Rowe, Jr.
to use the same key for socket data. Another problem is that any cleanup specified in the call to apr_socket_data_set() is run when the pool is cleaned up, not when the socket is destroyed (in contradiction to the doc). Err, yeah, why is it pool_userdata at all? I'm confused. Isn't using pool's