Max Message Send Buffer

What is the maximum size of the message that can be sent using QNX native passing IPC(MsgSend) ?

Thanks in advance,

With MsgSend it’s 2Gig because the size is specify by an int. For MsgSendv I don’t know, could be more but I think should be enough in most cases ;-)

Side note (from the documentation)

“In a local message pass, the kernel would ordinarily limit the size of the transfer to the minimum of both sizes. But in the networked case, the message is received by the client’s into its own private buffers and then sent via transport to the remote Since the size of the server’s receive data area can’t be known in advance by the client’s when the message is sent, only a fixed maximum size (currently 8 KB) message is transferred between the client and the server.”

This means, for example, that if the client sends 1 Mbyte of data and the server issues a MsgReceive() with a 1-Mbyte data area, then only the number of bytes determined by a network manager would in fact be transferred. The number of bytes transferred to the server is returned via the last parameter to MsgReceive() or a call to MsgInfo(), specifically the msglen member of struct _msg_info. The client doesn’t notice this, because it’s still blocked.

You can use the following code to ensure that the desired number of
bytes are received. Note that this is handled for you automatically when
you’re using the resource manager library:

chid = ChannelCreate(_NTO_CHF_SENDER_LEN);

rcvid = MsgReceive(chid, msg, nbytes, &info);

Doing a network transaction and not all
the message was send, so get the rest…
if (rcvid > 0 && info.srcmsglen > info.msglen &&
info.msglen < nbytes) {
int n;

if((n = MsgRead_r(rcvid, (char *) msg + info.msglen,
nbytes - info.msglen, info.msglen)) < 0) {
MsgError(rcvid, -n);
info.msglen += n;

Juan Manuel