I'm using custom sync method instead of built-in PING_PONG:
I send 10 ExtensionRequests from client to server.
Server side:
Code: Select all
public void handleClientRequest(User player, ISFSObject params) {
ISFSObject res = new SFSObject();
long timestamp = new Date().getTime();
res.putLong("tm", timestamp);
MainExtension parentExt = (MainExtension) getParentExtension();
parentExt.send(Cmd.SYNC_TIME, res, player);
}When I test it locally, i get average lag ~ 8 ms
But when i connect from other comuter in local network area, i get 350 ms latency, though average ping time (windows->cmd->ping) of server host computer is 2 ms.
What may be the problem? Am I doing something wrong?
Thanks in advance,
Ilya