commandToClient doesn't seem to call remote procedure right away
by Isidoros · in Torque Game Engine · 04/06/2009 (10:04 am) · 1 replies
I am studying common/server/clientConnection.cs script. In function GameConnection::OnConnect() there is a call to messageClient(). The last function is where we call commandToClient():
I was expecting clientCmdServerMessage() to be the next called function.
The log file shows that clientCmdServerMessage comes when the program leaves onConnect() function.
Why this happen?
Part of log file:
function messageClient(%client, %msgType, %msgString, %a1,..)
{
commandToClient(%client, 'ServerMessage', %msgType, %msgString, %a1,...);
}I was expecting clientCmdServerMessage() to be the next called function.
The log file shows that clientCmdServerMessage comes when the program leaves onConnect() function.
Why this happen?
Part of log file:
....
Entering GameConnection::onConnect(1298, Sid_Iron)
Entering (null)::messageClient(1298, 5, , You do not have the correct version of 3DGPAI1 client or the related art needed to play...mplampla mpla)
Leaving (null)::messageClient - return
Entering (null)::sendLoadInfoToClient(1298)
Entering (null)::messageClient(1298, 2, , Book B)
...
...
Leaving GameConnection::onConnect - return
Leaving (null)::LaunchGame - return
Mapping string: ServerMessage to index: 0
Mapping string: MsgConnectionError to index: 1
Entering (null)::clientCmdServerMessage(5 MsgConnectionError, , You do not have the correct version of 3DGPAI1 client or the related art needed to play...mplampla mpla)
.
...About the author
Associate Orion Elenzil
Real Life Plus
in general, you should assume that an arbitrary amount of time may pass between issuing a remote command and the remote command actually executing. in practise this delay is quite small, on the order of a handful of milliseconds.