qbipcc.h.3   qbipcc.h.3 
qbipcc.h(3) libqb qbipcc .h(3) qbipcc.h(3) libqb qbipcc .h(3)
NAME NAME
qbipcc.h - qbipcc.h -
Client IPC API. Client IPC API'.
SYNOPSIS SYNOPSIS
#include <qb/qbconfig.h>
#include <pthread.h> #include <pthread.h>
#include <sys/poll.h> #include <sys/poll.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <qb/qbhdb.h> #include <qb/qbhdb.h>
#include <qb/qbipc_common.h> #include <qb/qbipc_common.h>
Typedefs Typedefs
typedef struct qb_ipcc_connection qb_ipcc_connection_t typedef struct qb_ipcc_connection qb_ipcc_connection_t
Functions Functions
qb_ipcc_connection_t * qb_ipcc_connect (const char *name, size_t max _msg_size) qb_ipcc_connection_t * qb_ipcc_connect (const char *name, size_t max _msg_size)
Create a connection to an IPC service. Create a connection to an IPC service'.
void qb_ipcc_disconnect (qb_ipcc_connection_t *c) void qb_ipcc_disconnect (qb_ipcc_connection_t *c)
Disconnect an IPC connection. Disconnect an IPC connection'.
int32_t qb_ipcc_fd_get (qb_ipcc_connection_t *c, int32_t *fd) int32_t qb_ipcc_fd_get (qb_ipcc_connection_t *c, int32_t *fd)
Get the file descriptor to poll. Get the file descriptor to poll'.
int32_t qb_ipcc_fc_enable_max_set (qb_ipcc_connection_t *c, uint32_t
max)
Set the maximum allowable flowcontrol value'.
ssize_t qb_ipcc_send (qb_ipcc_connection_t *c, const void *msg_ptr, size_t msg_len) ssize_t qb_ipcc_send (qb_ipcc_connection_t *c, const void *msg_ptr, size_t msg_len)
Send a message. Send a message'.
ssize_t qb_ipcc_sendv (qb_ipcc_connection_t *c, const struct iovec * iov, size_t iov_len) ssize_t qb_ipcc_sendv (qb_ipcc_connection_t *c, const struct iovec * iov, size_t iov_len)
Send a message (iovec). Send a message (iovec)'.
ssize_t qb_ipcc_recv (qb_ipcc_connection_t *c, void *msg_ptr, size_t msg_len, int32_t ms_timeout) ssize_t qb_ipcc_recv (qb_ipcc_connection_t *c, void *msg_ptr, size_t msg_len, int32_t ms_timeout)
Receive a response. Receive a response'.
ssize_t qb_ipcc_sendv_recv (qb_ipcc_connection_t *c, const struct io vec *iov, uint32_t iov_len, void *msg_ptr, size_t msg_len, int32_t ms_timeo ut) ssize_t qb_ipcc_sendv_recv (qb_ipcc_connection_t *c, const struct io vec *iov, uint32_t iov_len, void *msg_ptr, size_t msg_len, int32_t ms_timeo ut)
This is a convenience function that simply sends and then recvs. This is a convenience function that simply sends and then recvs' .
ssize_t qb_ipcc_event_recv (qb_ipcc_connection_t *c, void *msg_ptr, size_t msg_len, int32_t ms_timeout) ssize_t qb_ipcc_event_recv (qb_ipcc_connection_t *c, void *msg_ptr, size_t msg_len, int32_t ms_timeout)
Receive an event. Receive an event'.
Detailed Description Detailed Description
Client IPC API. Client IPC API'.
Lifecycle of an IPC connection. Lifecycle of an IPC connection'.
An IPC connection is made to the server with qb_ipcc_connect(). An IPC connection is made to the server with qb_ipcc_connect()'.
This function connects to the server and requests channels be created for c This function connects to the server and requests channels be created for
ommunication. To disconnect, the client either exits or executes the functi communication'. To disconnect, the client either exits or executes the func
on tion
qb_ipcc_disconnect(). qb_ipcc_disconnect()'.
Synchronous communication Synchronous communication
The function qb_ipcc_sendv_recv() sends an iovector request and receives a response. The function qb_ipcc_sendv_recv() sends an iovector request and receives a response'.
Asynchronous requests from the client Asynchronous requests from the client
The function qb_ipcc_sendv() sends an iovector request. The func tion qb_ipcc_send() sends an message buffer request. The function qb_ipcc_sendv() sends an iovector request'. The fun ction qb_ipcc_send() sends an message buffer request'.
Asynchronous events from the server Asynchronous events from the server
The qb_ipcc_event_recv() function receives an out-of-band asyncr The qb_ipcc_event_recv() function receives an out-of-band asyncr
onous message. The asynchronous messages are queued and can provide very hi onous message'. The asynchronous messages are queued and can provide very h
gh out-of-band performance. To determine when to call qb_ipcc_event_recv() igh out-of-band performance'. To determine when to call qb_ipcc_event_recv(
the ) the
qb_ipcc_fd_get() call is used to obtain a file descriptor used i qb_ipcc_fd_get() call is used to obtain a file descriptor used i
n the poll() or select() system calls. n the poll() or select() system calls'.
Typedef Documentation Typedef Documentation
typedef struct qb_ipcc_connection qb_ipcc_connection_t typedef struct qb_ipcc_connection qb_ipcc_connection_t
Function Documentation Function Documentation
qb_ipcc_connection_t* qb_ipcc_connect (const char * name, size_t max_msg qb_ipcc_connection_t* qb_ipcc_connect (const char *name, size_tmax_msg_s
_size) ize)
Create a connection to an IPC service. Parameters: Create a connection to an IPC service'. Parameters:
name name of the service. name name of the service'.
max_msg_size biggest msg size. max_msg_size biggest msg size'.
Returns: Returns:
NULL (error: see errno) or a connection object. NULL (error: see errno) or a connection object'.
void qb_ipcc_disconnect (qb_ipcc_connection_t * c) void qb_ipcc_disconnect (qb_ipcc_connection_t *c)
Disconnect an IPC connection. Parameters: Disconnect an IPC connection'. Parameters:
c connection instance c connection instance
ssize_t qb_ipcc_event_recv (qb_ipcc_connection_t * c, void * msg_ptr, si ssize_t qb_ipcc_event_recv (qb_ipcc_connection_t *c, void *msg_ptr, size
ze_t msg_len, int32_t ms_timeout) _tmsg_len, int32_tms_timeout)
Receive an event. Parameters: Receive an event'. Parameters:
c connection instance c connection instance
msg_ptr pointer to a message buffer to receive into msg_ptr pointer to a message buffer to receive into
msg_len the size of the buffer msg_len the size of the buffer
ms_timeout time in milli seconds to wait for a message 0 == no w ait, negative == block, positive == wait X ms. ms_timeout time in milli seconds to wait for a message 0 == no w ait, negative == block, positive == wait X ms'.
ms_timeout max time to wait for a response ms_timeout max time to wait for a response
Returns: Returns:
size of the message or error (-errno) size of the message or error (-errno)
int32_t qb_ipcc_fd_get (qb_ipcc_connection_t * c, int32_t * fd) int32_t qb_ipcc_fc_enable_max_set (qb_ipcc_connection_t *c, uint32_tmax)
Get the file descriptor to poll. Parameters: Set the maximum allowable flowcontrol value'. Note:
the default is 1
Parameters:
c connection instance
max the max allowable flowcontrol value (1 or 2)
int32_t qb_ipcc_fd_get (qb_ipcc_connection_t *c, int32_t *fd)
Get the file descriptor to poll'. Parameters:
c connection instance c connection instance
fd (out) file descriptor to poll fd (out) file descriptor to poll
ssize_t qb_ipcc_recv (qb_ipcc_connection_t * c, void * msg_ptr, size_t m ssize_t qb_ipcc_recv (qb_ipcc_connection_t *c, void *msg_ptr, size_tmsg_
sg_len, int32_t ms_timeout) len, int32_tms_timeout)
Receive a response. Parameters: Receive a response'. Parameters:
c connection instance c connection instance
msg_ptr pointer to a message buffer to receive into msg_ptr pointer to a message buffer to receive into
msg_len the size of the buffer msg_len the size of the buffer
ms_timeout max time to wait for a response ms_timeout max time to wait for a response
Returns: Returns:
(size recv'ed, -errno == error) (size recv'ed, -errno == error)
ssize_t qb_ipcc_send (qb_ipcc_connection_t * c, const void * msg_ptr, si ssize_t qb_ipcc_send (qb_ipcc_connection_t *c, const void *msg_ptr, size
ze_t msg_len) _tmsg_len)
Send a message. Parameters: Send a message'. Parameters:
c connection instance c connection instance
msg_ptr pointer to a message to send msg_ptr pointer to a message to send
msg_len the size of the message msg_len the size of the message
Returns: Returns:
(size sent, -errno == error) (size sent, -errno == error)
ssize_t qb_ipcc_sendv (qb_ipcc_connection_t * c, const struct iovec * io ssize_t qb_ipcc_sendv (qb_ipcc_connection_t *c, const struct iovec *iov,
v, size_t iov_len) size_tiov_len)
Send a message (iovec). Parameters: Send a message (iovec)'. Parameters:
c connection instance c connection instance
iov pointer to an iovec struct to send iov pointer to an iovec struct to send
iov_len the number of iovecs used iov_len the number of iovecs used
Returns: Returns:
(size sent, -errno == error) (size sent, -errno == error)
ssize_t qb_ipcc_sendv_recv (qb_ipcc_connection_t * c, const struct iovec ssize_t qb_ipcc_sendv_recv (qb_ipcc_connection_t *c, const struct iovec
* iov, uint32_t iov_len, void * msg_ptr, size_t msg_len, int32_t ms_timeou *iov, uint32_tiov_len, void *msg_ptr, size_tmsg_len, int32_tms_timeout)
t) This is a convenience function that simply sends and then recvs'. Pa
This is a convenience function that simply sends and then recvs. Par rameters:
ameters:
c connection instance c connection instance
iov pointer to an iovec struct to send iov pointer to an iovec struct to send
iov_len the number of iovecs used iov_len the number of iovecs used
msg_ptr pointer to a message buffer to receive into msg_ptr pointer to a message buffer to receive into
msg_len the size of the buffer msg_len the size of the buffer
ms_timeout max time to wait for a response ms_timeout max time to wait for a response
See also: See also:
qb_ipcc_sendv() qb_ipcc_recv() qb_ipcc_sendv() qb_ipcc_recv()
Author Author
Generated automatically by Doxygen for libqb from the source code. Generated automatically by Doxygen for libqb from the source code'.
Version 0.4.1 Mon Jan 31 2011 qbipcc .h(3) Version 0.8.1 Thu Jan 5 2012 qbipcc .h(3)
 End of changes. 27 change blocks. 
53 lines changed or deleted 64 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/