#include <FXIPC.h>
Messages without acks are silently ignored - however messages with acks not handled by the channel (eg; because they are not recognised) are replied to with this message
Public Types | |
typedef FXIPCMsgChunkCodeAlloc < FXIPCMsg_Disconnect::id::nextcode, false > | id |
typedef FXIPCMsgRegister< id, FXIPCMsg_Unhandled > | regtype |
enum | Flags { FlagsWantAck, FlagsGZipped, FlagsHasRouting, FlagsIsBigEndian } |
Public Member Functions | |
FXIPCMsg_Unhandled (FXuint _id=0, FXuchar _cause=0) | |
void | endianise (FXStream &ds) const |
void | deendianise (FXStream &ds) |
bool | operator== (const FXIPCMsg &o) const throw () |
bool | operator!= (const FXIPCMsg &o) const throw () |
int | headerLength () const throw () |
FXuint | length () const throw () |
FXuint | msgType () const throw () |
bool | hasAck () const throw () |
FXuint | msgId () const throw () |
void | setMsgId (FXuint id) throw () |
bool | wantsAck () const throw () |
bool | gzipped () const throw () |
void | setGZipped (bool v) throw () |
bool | hasRouting () const throw () |
FXuint | routing () const throw () |
void | setRouting (FXuint no) throw () |
bool | inBigEndian () const throw () |
FXuchar * | originalData () const throw () |
void | write (FXStream &s) const |
void | read (FXStream &s) |
Public Attributes | |
FXuchar | cause |
Static Public Attributes | |
static const FXuint | minHeaderLength |
static const FXuint | maxHeaderLength |
Friends | |
class | FXIPCChannel |
class | FXIPCChannelIndirector |
enum FX::FXIPCMsg::Flags [inherited] |
FlagsWantAck | If unset and this message has an ack, don't bother serialising the ack. |
FlagsGZipped | If set, data has been run through a FX::QGZipDevice. |
FlagsHasRouting | If set, msg contains routing number. |
FlagsIsBigEndian | If set, the sender was big endian. |
bool FX::FXIPCMsg::operator== | ( | const FXIPCMsg & | o | ) | const throw () [inline, inherited] |
True if this message is identical to the other message.
bool FX::FXIPCMsg::operator!= | ( | const FXIPCMsg & | o | ) | const throw () [inline, inherited] |
True if this message is not identical to the other message.
int FX::FXIPCMsg::headerLength | ( | ) | const throw () [inline, inherited] |
Length of the header only when serialised.
References FX::FXIPCMsg::FlagsHasRouting, and FX::FXIPCMsg::minHeaderLength.
FXuint FX::FXIPCMsg::length | ( | ) | const throw () [inline, inherited] |
Returns the length of the message in bytes. Unset until sent or received.
FXuint FX::FXIPCMsg::msgType | ( | ) | const throw () [inline, inherited] |
Returns the type of the message.
bool FX::FXIPCMsg::hasAck | ( | ) | const throw () [inline, inherited] |
Returns true if the message has an ack.
FXuint FX::FXIPCMsg::msgId | ( | ) | const throw () [inline, inherited] |
Returns the internal unique id count of the message.
void FX::FXIPCMsg::setMsgId | ( | FXuint | id | ) | throw () [inline, inherited] |
Sets the internal unique id count of the message.
bool FX::FXIPCMsg::wantsAck | ( | ) | const throw () [inline, inherited] |
Returns true if the sender of this message is waiting for the ack.
References FX::FXIPCMsg::FlagsWantAck.
bool FX::FXIPCMsg::gzipped | ( | ) | const throw () [inline, inherited] |
void FX::FXIPCMsg::setGZipped | ( | bool | v | ) | throw () [inline, inherited] |
Sets if the data sent in this message is GZipped. Use only on very slow connections.
References FX::FXIPCMsg::FlagsGZipped.
bool FX::FXIPCMsg::hasRouting | ( | ) | const throw () [inline, inherited] |
FXuint FX::FXIPCMsg::routing | ( | ) | const throw () [inline, inherited] |
Returns the routing number of this message.
void FX::FXIPCMsg::setRouting | ( | FXuint | no | ) | throw () [inline, inherited] |
bool FX::FXIPCMsg::inBigEndian | ( | ) | const throw () [inline, inherited] |
Returns true if the message was serialised by a big endian architecture.
References FX::FXIPCMsg::FlagsIsBigEndian.
FXuchar* FX::FXIPCMsg::originalData | ( | ) | const throw () [inline, inherited] |
Returns a pointer to the serialised data from which this message was constructed (if it wasn't generated this way, then zero). FX::FXIPCChannel only sets this when a received message is known, not an ack and only for the duration of normal message handling - it is reset to zero if you detach a message to prevent you using the wrong data (as the buffer gets overwritten).
void FX::FXIPCMsg::write | ( | FXStream & | s | ) | const [inline, inherited] |
Dumps the message header to stream s. Does not send subclass data - you need to use this as part of a larger call.
References FX::FXIPCMsg::FlagsHasRouting.
void FX::FXIPCMsg::read | ( | FXStream & | s | ) | [inline, inherited] |
const FXuint FX::FXIPCMsg::minHeaderLength [static, inherited] |
const FXuint FX::FXIPCMsg::maxHeaderLength [static, inherited] |
The maximum possible size of a header.