Session¶
Types and functions to for individual WSGI sessions and their exchanges.
Types¶
-
struct ymo_wsgi_session¶
This is where the python WSGI session is tracked C-side.
struct ymo_wsgi_session { size_t id; ymo_wsgi_exchange_t* head; ymo_wsgi_worker_t* worker; pthread_mutex_t lock; atomic_int_least16_t refcnt; atomic_uint_least8_t closed; ymo_wsgi_exchange_pool_t pool; };
Functions¶
-
ymo_status_t ymo_wsgi_session_init(void *server_data, ymo_http_session_t *http_session)¶
-
void ymo_wsgi_session_cleanup(void *server_data, ymo_http_session_t *http_session, void *data)¶
-
ymo_wsgi_worker_t *ymo_wsgi_session_worker(ymo_wsgi_session_t *session)¶
-
ymo_wsgi_exchange_t *ymo_wsgi_session_create_exchange(ymo_wsgi_session_t *session, ymo_http_request_t *request, ymo_http_response_t *response)¶
-
void ymo_wsgi_session_exchange_done(ymo_wsgi_session_t *session)¶
-
size_t ymo_wsgi_session_incref(ymo_wsgi_session_t *session)¶
-
size_t ymo_wsgi_session_decref(ymo_wsgi_session_t *session)¶
-
void ymo_wsgi_session_close(ymo_wsgi_session_t *session)¶
-
int ymo_wsgi_session_is_closed(ymo_wsgi_session_t *session)¶
-
int ymo_wsgi_session_maybe_closed(ymo_wsgi_session_t *session)¶
-
int ymo_wsgi_session_lock(ymo_wsgi_session_t *session)¶
-
int ymo_wsgi_session_trylock(ymo_wsgi_session_t *session)¶
-
int ymo_wsgi_session_unlock(ymo_wsgi_session_t *session)¶