IP_TaskSendSync

IP_TaskSendSync — transmits a message, and waits for a reply.

Syntax

#include <cogent.h>
int IP_TaskSendSync(IP_Task*  myself,
 IP_Task*  receiver,
 IP_Msg*  smsg,
 IP_Msg*  rmsg);

Arguments

myself

A task structure referring to the current task.

receiver

The task receiving the message.

smsg

The message structure containing the data to send.

rmsg

The message structure into which received data will be written.

Returns

0 on success, or -1 on failure and errno is set.

Description

This function transmits a message (smsg) from myself to the receiver, and waits for the receiver to reply. There is no limit to how long the receiver may delay prior to replying. The reply data will be written into the rmsg buffer. If the rmsg data area is not large enough to accommodate the entire reply, then the result is OS-dependent. This will change in future versions of this API.

See Also

Sending Messages, IP_TaskCloseSync, IP_TaskSendAsync, , IP_TaskSendRaw