Common Declarations

Miscellaneous types and utilities

Definitions

Default number of process workers.

Maximum number of process worker restarts before we give up.

Default number of WSGI threads to run.

Default max (fs) path length:

YMO_WSGI_HDR_NAME_MAX_LEN

Header-field name max length

Definition
#define YMO_WSGI_HDR_NAME_MAX_LEN       256
YMO_WSGI_WORKER_QUEUE_POOL_SIZE

Number of queue nodes preallocated per thread worker.

Definition
#define YMO_WSGI_WORKER_QUEUE_POOL_SIZE 100
YMO_WSGI_EXCHANGE_POOL_SIZE

Number of exchange structs to preallocated per session.

Definition
#define YMO_WSGI_EXCHANGE_POOL_SIZE     2
YIMMO_CONTEXT_PY

cast a C yimmo context to a Python object pointer.

Definition
#define YIMMO_CONTEXT_PY(ptr) ((PyObject*)(ptr))
YIMMO_CONTEXT_C

cast a Python object pointer to a C yimmo context.

Definition
#define YIMMO_CONTEXT_C(ptr) ((yimmo_context_t*)(ptr))
YIMMO_WEBSOCKET_PY

cast a C yimmo websocket to a Python object pointer.

Definition
#define YIMMO_WEBSOCKET_PY(ptr) ((PyObject*)(ptr))
YIMMO_WEBSOCKET_C

cast a Python object pointer to a C yimmo websocket.

Definition
#define YIMMO_WEBSOCKET_C(ptr) ((yimmo_websocket_t*)(ptr))

Types

type ymo_wsgi_worker_t

Encapsulates the data for a single yimmo-wsgi _thread_ worker.

Definition
typedef struct ymo_wsgi_worker ymo_wsgi_worker_t;
type ymo_wsgi_session_t

Encapsulate the data for a single yimmo-wsgi HTTP session.

Definition
typedef struct ymo_wsgi_session ymo_wsgi_session_t;
type ymo_wsgi_exchange_t

Encapsulates the data for a single yimmo-wsgi exchange — i.e. a request/response pair.

Definition
typedef struct ymo_wsgi_exchange ymo_wsgi_exchange_t;
type yimmo_context_t

Encapsulates the “WSGI view” of a session, environ, start_response, etc. For more info, see PEP3333.

Definition
typedef struct yimmo_context yimmo_context_t;
type yimmo_websocket_t

A Yimmo Python WebSocket connection.

Definition
typedef struct yimmo_websocket yimmo_websocket_t;
type ymo_wsgi_proc_t

Encapsulates the data for a single yimmo-wsgi _process_ worker.

Definition
typedef struct ymo_wsgi_proc ymo_wsgi_proc_t;
type ymo_wsgi_exchange_pool_t

Pool type used to minimize malloc/free calls for sessions which involve multiple exchanges.

Definition
typedef struct ymo_wsgi_exchange_pool ymo_wsgi_exchange_pool_t;