Listing 1. Sender code snip

// Sender code snip<\n>

char inArea[2048];
char outArea[2048];

main(int argc, char **argv)
{
FCID toWhom;

// give the sender a SIMPL name
attachName(MYSENDER, 2048, NULL);

// establish a communication path to the intended receiver
toWhom=nameLocatex(MYRECEIVER);

// build the outgoing message
sprintf(outArea,"hello world");

// send the message
loadSend(outArea,strlen(outArea));
sendMsgx(toWhom);

// fetch the reply
retrieveReply(inArea);

// show the reply
printf("The reply message was <%s>\n",inArea);

// cleanup
detachName();

}// end sender