template<class msgacktype, class msgtype>
bool FX::FXIPCChannel::sendMsg ( msgacktype *FXRESTRICT  msgack,
msgtype *FXRESTRICT  msg,
FXuint  waitfor = FXINFINITE 
) [inline]

Returns:
True if the ack message was received within the specified timeout
Parameters:
msgack Pointer to an already constructed corresponding ack message. If zero, we don't care about ack (throw it away)
msg Pointer to the message to be sent
waitfor Specifies how long to wait for the ack message. If zero, returns immediately.
Used to send a message and wait for an ack. If the message does not have an ack, returns immediately. You must preserve msg until its ack is received. If the transport send throws a FX::FXConnectionLostException sendMsg() asks the monitor thread to exit before rethrowing the exception. sendMsg() adjusts itself to use less memory when FXProcess::memoryFull() is true.
Note:
If the channel suddenly closes before an ack to a message you sent arrives, sendMsg() and getMsgAck() throw a FX::FXConnectionLostException.

Definition at line 729 of file FXIPC.h.

References FXSTATIC_ASSERT.

00730     {
00731         FXSTATIC_ASSERT(!msgtype::id::hasAck || msgtype::id::code+1==msgacktype::id::code, AckMsg_Not_Ack_Of_Msg);
00732         return sendMsgI(msgack, msg, &msgtype::regtype::endianise, waitfor);
00733     }


(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:34:33 2009 for TnFOX by doxygen v1.4.7