NAME

cat_close - deallocate a session context

SYNOPSIS

#include <cat.h>

int cat_close(cat_session *session);

DESCRIPTION

Deallocates a session context, frees any filters on the session context's filter stacks, and destroys any user data. It also invokes all callbacks installed for this session with calls to cat_onclose().

RETURN VALUES

The function returns CAT_OK if successful, or a negative error code otherwise. Specifically, it returns CAT_EBUSY if the session is in use and therefore cannot be closed.

SEE ALSO

cat, cat_onclose