#include <cybergarage/util/clist.h>
#include <cybergarage/util/ctime.h>
#include <cybergarage/util/cmutex.h>
#include <cybergarage/http/chttp.h>
#include <cybergarage/net/csocket.h>
#include <cybergarage/util/clog.h>
Data Structures | |
struct | _CgHttpPersistentConnection |
Defines | |
#define | CG_HTTP_PERSISTENT_CACHE_SIZE 5 |
#define | CG_HTTP_PERSISTENT_TIMEOUT_PERIOD 60 |
Typedefs | |
typedef _CgHttpPersistentConnection | CgHttpPersistentConnection |
typedef _CgHttpPersistentConnection | CgHttpPersistentConnectionList |
Functions | |
BOOL | cg_http_persistentconnection_init (void) |
CgHttpPersistentConnection * | cg_http_persistentconnection_new (void) |
void | cg_http_persistentconnection_delete (CgHttpPersistentConnection *node) |
void * | cg_http_persistentconnection_get (char *host, int port) |
BOOL | cg_http_persistentconnection_put (char *host, int port, void *data) |
void | cg_http_persistentconnection_clear (void) |
void | cg_http_persistentconnection_lock (void) |
void | cg_http_persistentconnection_unlock (void) |
Variables | |
static CgHttpPersistentConnectionList * | cache = NULL |
static CgMutex * | persistent_connection_mutex = NULL |
#define CG_HTTP_PERSISTENT_CACHE_SIZE 5 |
#define CG_HTTP_PERSISTENT_TIMEOUT_PERIOD 60 |
typedef struct _CgHttpPersistentConnection CgHttpPersistentConnection |
typedef struct _CgHttpPersistentConnection CgHttpPersistentConnectionList |
void cg_http_persistentconnection_clear | ( | void | ) |
Clear persistent connection cache and free all memory
void cg_http_persistentconnection_delete | ( | CgHttpPersistentConnection * | node | ) |
void* cg_http_persistentconnection_get | ( | char * | host, | |
int | port | |||
) |
Get persistent connection from cache
BOOL cg_http_persistentconnection_init | ( | void | ) |
Initialize persistent connection cache. Can be called many times
void cg_http_persistentconnection_lock | ( | void | ) |
Lock persistent connection cache. Required for getting, putting and using persistent connection from cache
CgHttpPersistentConnection* cg_http_persistentconnection_new | ( | void | ) |
BOOL cg_http_persistentconnection_put | ( | char * | host, | |
int | port, | |||
void * | data | |||
) |
Put connection to persistent connection cache
void cg_http_persistentconnection_unlock | ( | void | ) |
Unlock persistent connection cache.
CgHttpPersistentConnectionList* cache = NULL [static] |
CgMutex* persistent_connection_mutex = NULL [static] |