Server restarted, Clients need to reconnect but how ?
by Devrim Erdem · in Torque Game Engine · 06/20/2004 (8:31 am) · 3 replies
Hello,
I have a server client application couple. At some point server dies. I manually restart the server and I would the client to reconnect to the new server.
I have tried to delete the current client connection and reconstruct it. The connection terminates with the message "Shutdown" but the new client can not connect to the server. ( both clients are in the same process. )
What could I be doing wrong ?
I have a server client application couple. At some point server dies. I manually restart the server and I would the client to reconnect to the new server.
I have tried to delete the current client connection and reconstruct it. The connection terminates with the message "Shutdown" but the new client can not connect to the server. ( both clients are in the same process. )
What could I be doing wrong ?
#2
So what I need to do now is to create a new connection if existing one dies. The time out is too long for my application, how can I change the time out ? I couldn't see a ::setTimeOut method.
Thanks.
06/22/2004 (12:45 am)
No they are not sharing the interface. I have just noticed that it works when I delete and re-create the client. Since the timeout is too long, it wasn't possible for me to notice that TNL::NetConnection::onConnectTimedOut() is called.So what I need to do now is to create a new connection if existing one dies. The time out is too long for my application, how can I change the time out ? I couldn't see a ::setTimeOut method.
Thanks.
#3
06/23/2004 (1:15 pm)
Currently the timeout is defined as NetConnection::PingRetryCount * NetConnection::PingTimeout. Change either of these numbers down to decrease the timeout interval. Also, in the HEAD version, the timeout method called is NetConnection::onConnectionTerminated. If the connect attempt times out before a connection is established, NetConnection::onConnectTerminated will be called.
Associate Kyle Carter
Are your client and server sharing a NetInterface?