|
hamsterdb Embedded Database
2.1.1
|
Data Structures | |
| struct | ham_srv_config_t |
Typedefs | |
| typedef struct ham_srv_t | ham_srv_t |
Functions | |
| ham_status_t | ham_srv_init (ham_srv_config_t *config, ham_srv_t **srv) |
| ham_status_t | ham_srv_add_env (ham_srv_t *srv, ham_env_t *env, const char *urlname) |
| void | ham_srv_close (ham_srv_t *srv) |
Definition at line 48 of file hamsterdb_srv.h.
| ham_status_t ham_srv_add_env | ( | ham_srv_t * | srv, |
| ham_env_t * | env, | ||
| const char * | urlname | ||
| ) |
Add a hamsterdb Environment
This function adds a new hamsterdb Environment to the server. The Environment has to be initialized properly by the caller. It will be served at http://localhost:<port>/<urlname>, where <port> was specified for ham_srv_init and urlname is the third parameter to this function.
A client accessing this Environment will specify this URL as a filename, and hamsterdb will transparently connect to this server.
| srv | A valid ham_srv_t handle |
| env | A valid hamsterdb Environment handle |
| urlname | URL of this Environment |
Referenced by main().
| void ham_srv_close | ( | ham_srv_t * | srv | ) |
Referenced by main().
| ham_status_t ham_srv_init | ( | ham_srv_config_t * | config, |
| ham_srv_t ** | srv | ||
| ) |
Initialize the server
This function initializes a ham_srv_t handle and starts the hamsterdb database server on the port specified in the configuration object.
| config | A configuration structure |
| srv | A pointer to a ham_srv_t pointer; will be allocated if this function returns successfully |
Referenced by main().
1.7.6.1