Connection API

Functions used to connect to the servers. More...

Functions

nmdb_tnmdb_init ()
 Create a new nmdb_t pointer, used to talk with the server.
int nmdb_add_tipc_server (nmdb_t *db, int port)
 Add a TIPC server.
int nmdb_add_tcp_server (nmdb_t *db, const char *addr, int port)
 Add a TCP server.
int nmdb_add_udp_server (nmdb_t *db, const char *addr, int port)
 Add an UDP server.
int nmdb_add_sctp_server (nmdb_t *db, const char *addr, int port)
 Add a SCTP server.
int nmdb_free (nmdb_t *db)
 Free a nmdb_t structure created by nmdb_init().

Detailed Description

Functions used to connect to the servers.


Function Documentation

nmdb_t* nmdb_init (  ) 

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.
int nmdb_free ( nmdb_t db  ) 

Free a nmdb_t structure created by nmdb_init().

It also closes all the connections opened to the servers.

Parameters:
db connection instance.
Returns:
1 on success, 0 on failure.
Generated on Sun Oct 10 19:50:36 2010 for libnmdb (public) by  doxygen 1.6.3