#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 |
|
|
|
|
|
|
|
|
|
Clear persistent connection cache and free all memory |
|
|
|
Get persistent connection from cache |
|
Initialize persistent connection cache. Can be called many times |
|
Lock persistent connection cache. Required for getting, putting and using persistent connection from cache |
|
|
|
Put connection to persistent connection cache |
|
Unlock persistent connection cache. |
|
|
|
|