Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/a/asyncmsg_put.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/a/asyncmsg_put.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/a/asyncmsg_put.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/a/asyncmsg_put.html on line 8
Send an asynchronous message to a connection
|
Asynchronous messaging is an experimental feature;
for information about the use of
experimental software, see the Commercial Software License Agreement (CSLA) or
Partner Software License Agreement (PSLA) in the Licensing area of our website,
http://www.qnx.com/legal/licensing/. |
#include <sys/asyncmsg.h>
int asyncmsg_put( int coid,
const void *buff,
size_t size,
unsigned handle),
int (*call_back) (
int err,
void* buf,
unsigned handle ));
int asyncmsg_putv( int coid,
const iov_t* iov,
int parts,
unsigned handle,
int (*call_back) (
int err,
void* buf,
unsigned handle ));
- coid
- The ID of the connection to send the message to.
- buff
- (asyncmsg_put() only) A pointer to the buffer that holds the message.
- size
- (asyncmsg_put() only) The size of the message.
- iov
- (asyncmsg_putv() only)
A pointer to an array of IOV buffers that hold message.
- parts
- (asyncmsg_putv() only) The number of elements in the IOV array.
- handle
- A user-defined handle that's passed to the call_back function
to allow for quick identification of the message's package.
- call_back
- NULL, or a function to call when a message is processed.
If this argument is NULL, the call_back
specified in the
_asyncmsg_connection_attr
passed to
asyncmsg_connect_attach()
is called.
libasyncmsg
Use the -l asyncmsg option to
qcc
to link against this library.
The asyncmsg_put() and asyncmsg_putv() functions send
an asynchronous message to the connection identified by the coid
argument:
- For asyncmsg_put(), buff points to the message,
and size specifies its length.
- For asyncmsg_putv(), the message is stored in an I/O vector
pointed to by iov, and parts specifies the number
of entries in the array.
You can use the handle, which is passed to the call_back
function, to help you identify the message.
EOK, or -1 if an error occurred
(errno is set).
- EBADF
- The connection specified by coid doesn't exist.
- EFAULT
- A fault occurred when the kernel tried to access the buffers provided.
- EAGAIN
- The send queue is full.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
asyncmsg_channel_create(),
asyncmsg_channel_destroy(),
asyncmsg_connect_attach(),
asyncmsg_connect_attr(),
_asyncmsg_connection_attr,
asyncmsg_connect_detach(),
asyncmsg_flush(),
asyncmsg_free(),
asyncmsg_get(),
asyncmsg_malloc()
Asynchronous Messaging
technote
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/a/asyncmsg_put.html on line 223
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/a/asyncmsg_put.html on line 223