From: SourceForge.net <no...@so...> - 2006-11-12 19:35:34
|
Feature Requests item #1522162, was opened at 2006-07-13 16:48 Message generated for change (Settings changed) made by sdeasey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1522162&group_id=130646 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Stephen Deasey (sdeasey) Assigned to: Stephen Deasey (sdeasey) Summary: Sls: Socket Local Storage API Initial Comment: I'd like to add a version of the Ns_Cls (conn local storage) API with different scope: the data would be stored with the socket, not the connection. The difference is the lifetime of the data. Cls data is cleaned up at the end of every conn. That is, after logging. Sls data would only be cleaned up when a connected TCP socket is closed. Driver modules already have an 'arg' pointer in the Ns_Sock structure on which they can hang data, but there's only one pointer available. The attached patch Implements the Sls API, and also a keyed version with which C code can inter-opperate with Tcl code. There's a Tcl API to the keyed interface for this. The only unusual feature is that the code tries to allocate only enough space for the slots which are allocated. Cls code hangs an 16 element array off the conn structure. Sls code size the Sock structure itself, depending on the slots allocated. This makes the Sock structures more cache friendly as they're looped over in the driver code. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1522162&group_id=130646 |