Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
PtConnectionSend, PtConnectionSendmx

PtConnectionSend, PtConnectionSendmx

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

PtConnectionSend(), PtConnectionSendmx()

Send a message to a server

Synopsis:

int PtConnectionSend(
        PtConnectionClient_t *connection,
        unsigned long type,
        const void *smsg,
        void *rmsg,
        unsigned snbytes,
        unsigned rnbytes );

int PtConnectionSendmx(
        PtConnectionClient_t *connection, 
        unsigned long type,
        int sparts,
        iov_t *siov,
        int rparts,
        iov_t *riov );

Library:

ph

Description:

The client of a connection uses these functions to send a message to the server. The server uses PtConnectionReply() and PtConnectionReplymx() to reply.

The arguments are similar to kernel functions, except that the message type isn't considered to be part of the message.

Under QNX 4, the iov_t type is a synonym for struct _mxfer_entry. The siov[0] and riov[0] entries are reserved for headers used internally by the library; the "real" message and reply buffer are defined by the contents of siov[1] through siov[sparts-1] and riov[1] through riov[rparts-1].

Returns:

The number of bytes in the reply, or -1 if the send failed (errno is set).

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtConnectionFlush(), PtConnectionNotify(), PtConnectionReply(), PtConnectionReplymx()

"Connections" in the Interprocess Communication chapter of the Photon Programmer's Guide