Returns the type of the waiting message (i.e.
the type supplied with send). The return value is zero when there is no message waiting.
One way to use this is to have a Table mapping message types to pre-allocated NetMessage subclasses so receiving looks like:
My base class for messages.
class Message : public NetMessage {
virtual void process() = 0;
};
Message* m = table[conduit->waitingMessageType()];
conduit->receive(m);
m->process();
Another is to simply SWITCH on the message type.
Implemented in G3D::ReliableConduit, and G3D::LightweightConduit.