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_connect_attach.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_connect_attach.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_connect_attach.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_connect_attach.html on line 8

asyncmsg_connect_attach()

Establish a connection to be used for asynchronous messages between a process and a channel


Caution: 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/.

Synopsis:

#include <sys/asyncmsg.h>

int asyncmsg_connect_attach (
       uint32_t nd,
       pid_t pid,
       int chid,
       unsigned index,
       unsigned flags, 
       const struct _asyncmsg_connection_attr * attr);

Arguments:

nd
The node descriptor of the node on which the process that owns the channel is running.
pid
The process ID of the owner of the channel.
chid
The channel ID, returned by asyncmsg_channel_create(), of the channel to connect to the process.
index
The lowest acceptable connection ID.
flags
Flags that specify the type and attributes of the connection:
_NTO_COF_NOSHARE
User wants to use its own buffer; otherwise the user gets the buffer from the asyncmsg_malloc() call, fills it in and sends it by calling the asyncmsg_put() function.
_NTO_COF_NONBLOCK
Don't block waiting if all the send headers are in use.
attr
A pointer to an _asyncmsg_connection_attr structure that specifies the connection attributes.

Library:

libasyncmsg

Use the -l asyncmsg option to qcc to link against this library.

Description:

The asyncmsg_connect_attach() function establishes a connection between the calling process and a channel identified by the arguments nd, pid and chid. The system returns the first available connection ID starting at the value specified by the index argument.

Returns:

A connection ID, or -1 if an error occurred (errno is set).

Errors:

EAGAIN
All kernel channel objects are in use.
ESRCH
The node indicated by nd, the process indicated by pid or the channel indicated by chid does not exist.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

See also:

asyncmsg_channel_create(), asyncmsg_channel_destroy(), asyncmsg_connect_attr(), asyncmsg_connect_detach(), asyncmsg_flush(), asyncmsg_free(), asyncmsg_get(), asyncmsg_malloc(), asyncmsg_put(), asyncmsg_putv()

ConnectAttach()

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_connect_attach.html on line 206

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_connect_attach.html on line 206