![]() |
• System Utilities | ||||||
|
API Links
Developer Links
|
Application::ReceiveMessageDefined in:
Called when an application-defined message is received.
C4Application.hPrototype
Parameters
Description
When the Message Manager receives a message with an application-defined type, it calls ReceiveMessage so that the application module may handle the message in whatever way it needs to. The implementation of the ReceiveMessage function should determine the type of the message object pointed to by the message parameter by calling Message::GetMessageType and then handle the message appropriately.If a connection exists with the sending machine, the sender parameter contains a pointer to the sending player. (On client machines, this player will always represent the server.) If the received message was sent without a connection, then the sender parameter is nullptr, and the network address of the sending machine is given by the address parameter.
See Also
Application::ConstructMessage
Message::HandleMessage
Player
Message
NetworkAddress
|