|
void | SetServerAddress (SystemAddress addr) |
| Set the address of the server. When you call SendMsg() the packet will be sent to this address.
|
|
virtual void | SendMsg (Lobby2Message *msg) |
| Send a command to the server.
|
|
virtual void | SendMsgAndDealloc (Lobby2Message *msg) |
| Same as SendMsg() Also calls Dealloc on the message factory.
|
|
void | SetOrderingChannel (char oc) |
| Ordering channel to send messages on.
|
|
void | SetSendPriority (PacketPriority pp) |
| Send priority to send messages on.
|
|
void | SetMessageFactory (Lobby2MessageFactory *f) |
| Creates messages from message IDs.
|
|
Lobby2MessageFactory * | GetMessageFactory (void) const |
| Returns whatever was passed to SetMessageFactory()
|
|
virtual void | SetCallbackInterface (Lobby2Callbacks *cb) |
| Set the callback to receive the results of operations via SendMsg()
|
|
virtual void | AddCallbackInterface (Lobby2Callbacks *cb) |
| You can have more than one callback to get called from the results of operations via SendMsg()
|
|
virtual void | RemoveCallbackInterface (Lobby2Callbacks *cb) |
| Removes a callback added with AddCallbackInterface();.
|
|
virtual void | ClearCallbackInterfaces () |
| Removes all callbacks added with AddCallbackInterface();.
|
|
virtual void | OnAttach (void) |
| Called when the interface is attached.
|
|
virtual void | OnDetach (void) |
| Called when the interface is detached.
|
|
virtual void | Update (void) |
| Update is called every time a packet is checked for .
|
|
virtual void | OnRakPeerStartup (void) |
| Called when RakPeer is initialized.
|
|
virtual void | OnRakPeerShutdown (void) |
| Called when RakPeer is shutdown.
|
|
virtual void | OnNewConnection (const SystemAddress &systemAddress, RakNetGUID rakNetGUID, bool isIncoming) |
|
virtual void | OnFailedConnectionAttempt (Packet *packet, PI2_FailedConnectionAttemptReason failedConnectionAttemptReason) |
|
virtual bool | UsesReliabilityLayer (void) const |
|
virtual void | OnDirectSocketSend (const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress) |
|
virtual void | OnDirectSocketReceive (const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress) |
|
virtual void | OnReliabilityLayerNotification (const char *errorMessage, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress, bool isError) |
|
virtual void | OnInternalPacket (InternalPacket *internalPacket, unsigned frameNumber, SystemAddress remoteSystemAddress, RakNet::TimeMS time, int isSend) |
|
virtual void | OnAck (unsigned int messageNumber, SystemAddress remoteSystemAddress, RakNet::TimeMS time) |
|
virtual void | OnPushBackPacket (const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress) |
|
Class used to send commands to Lobby2Server.
The lobby system works by sending implementations of Lobby2Message from Lobby2Client to Lobby2Server, and getting the results via Lobby2Client::SetCallbackInterface()
The client itself is a thin shell that does little more than call Serialize on the messages.
To use:
-
Call Lobby2Client::SetServerAddress() after connecting to the system running Lobby2Server.
-
Instantiate an instance of RakNet::Lobby2MessageFactory and register it with RakNet::Lobby2Plugin::SetMessageFactory() (the base class of Lobby2Client)
-
Call messageFactory.Alloc(command); where command is one of the Lobby2MessageID enumerations.
-
Instantiate a (probably derived) instance of Lobby2Callbacks and register it with Lobby2Client::SetCallbackInterface()
-
Cast the returned structure, fill in the input parameters, and call Lobby2Client::SendMsg() to send this command to the server.
-
Wait for the result of the operation to be sent to your callback. The message will contain the original input parameters, possibly output parameters, and Lobby2Message::resultCode will be filled in.