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 ));
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:
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).
| 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