Connection API
Functions used to connect to the servers.
More...
Detailed Description
Functions used to connect to the servers.
Function Documentation
Create a new nmdb_t pointer, used to talk with the server.
- Returns:
- a new connection instance.
int nmdb_add_tipc_server |
( |
nmdb_t * |
db, |
|
|
int |
port | |
|
) |
| | |
Add a TIPC server.
- Parameters:
-
| db | connection instance. |
| port | TIPC port to connect to (-1 means use the default). |
- Returns:
- 1 on success, 0 on failure.
int nmdb_add_tcp_server |
( |
nmdb_t * |
db, |
|
|
const char * |
addr, |
|
|
int |
port | |
|
) |
| | |
Add a TCP server.
- Parameters:
-
| db | connection instance. |
| addr | host to connect to. |
| port | port to connect to (-1 means use the default). |
- Returns:
- 1 on success, 0 on failure.
int nmdb_add_udp_server |
( |
nmdb_t * |
db, |
|
|
const char * |
addr, |
|
|
int |
port | |
|
) |
| | |
Add an UDP server.
- Parameters:
-
| db | connection instance. |
| addr | host to connect to. |
| port | port to connect to (-1 means use the default). |
- Returns:
- 1 on success, 0 on failure.
int nmdb_add_sctp_server |
( |
nmdb_t * |
db, |
|
|
const char * |
addr, |
|
|
int |
port | |
|
) |
| | |
Add a SCTP server.
- Parameters:
-
| db | connection instance. |
| addr | host to connect to. |
| port | port to connect to (-1 means use the default). |
- Returns:
- 1 on success, 0 on failure.
Free a nmdb_t structure created by nmdb_init().
It also closes all the connections opened to the servers.
- Parameters:
-
- Returns:
- 1 on success, 0 on failure.