When i send request from client to server and waiting for response is there a way in SmartFox to set timeout how long should client wait for response? Or should i do it myself?
And another question: is there a simple way to know in response send by server to client was delivered?
How to handle requests/response timeouts properly
- Niepodam Nigdy
- Posts: 18
- Joined: 08 Jan 2015, 16:47
Re: How to handle requests/response timeouts properly
There isn't a timeout mechanism, a part from the connection phase. This is usually dependent on the underlying OS TCP timeout.
There are very few reasons for using a req/resp. timeout. Not all requests get a response, some do others don't.
Also, it would be pretty difficult to set a proper timeout. Users with a slow connection may be put to a disadvantage by such mechanism and a temporary slow down on their side may cause errors that are unnecessary. The TCP already guarantees delivery and order, so it is only a matter of time.
I think it's best to let the user decide what to do. In the vast majority of cases there's no need for such thing.
Hope it helps
There are very few reasons for using a req/resp. timeout. Not all requests get a response, some do others don't.
Also, it would be pretty difficult to set a proper timeout. Users with a slow connection may be put to a disadvantage by such mechanism and a temporary slow down on their side may cause errors that are unnecessary. The TCP already guarantees delivery and order, so it is only a matter of time.
I think it's best to let the user decide what to do. In the vast majority of cases there's no need for such thing.
Hope it helps