apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject [PATCH] some progress with apr_socket_data_get()/apr_socket_data_set()
Date Tue, 15 Apr 2003 23:39:51 GMT
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 up, not when the socket is destroyed (in contradiction to the doc).

This patch fixes the first problem but not the second.  But before 
attacking the second, I wonder if we really need cleanups on socket 
data.  If a cleanup is really necessary, the application can make use 
subpools and pool cleanups in such a way as to achieve the goal.

Some may even ask why we need socket data, since the application can 
achieve something equivalent by careful use of subpools and pool userdata.

Personally I'm in favor of socket data but not in favor of 
socket-specific cleanups for that socket data (but that perhaps reflects 
which functionality I personally have used).


Note that the cleanup portion of the test suite change in the patch 
doesn't work since it assumes that cleanups are run when the socket is 

View raw message