IP_MsgDefaultSize

IP_MsgDefaultSize — gets the default size of interprocess messages.

Syntax

#include <cogent.h>

int IP_MsgDefaultSize(void);

Arguments

None.

Returns

The value of the environment variable IP_MSG_DEFAULT_SIZE if it is set, or 4096. If IP_MSG_DEFAULT_SIZE <= 0 then 4096 is returned. If IP_MSG_DEFAULT_SIZE > 65400, then 65400 is returned.

Description

This function returns the default message size for interprocess messages. The messaging primitives (Send/Receive/Reply) do not easily provide a sender information about the amount of space allocated by the receiver. By using the IP_MsgDefaultSize, all processes can agree on the message sizes being transmitted. The default size normally refers to the number of bytes in the data portion of the IP_MsgBuffer pointed to by an IP_Msg.

See Also

Messages, IP_MsgResize