cat_setsessdata - associate data with a session
#include <cat.h>
int cat_setsessdata(cat_session *sess, int key, void *data, cat_freefunc *freefun);
Associates the arbitrary data <data> with a session. When new data is set or when the session is
destroyed, the data will be freed using the supplied freefun, if freefun is non-NULL. The key is the identifier of the data and must be obtained by a prior call to cat_newdatakey().
The function returns CAT_OK if successful, or a negative error code otherwise.
When running in forking mode on UNIX, sessions will be closed as part of
the cleanup procedure in the child process.
cat, cat_newdatakey