RTC Forums
November 24, 2024, 06:40:35 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Do timeouts work differently under FMX ?  (Read 4437 times)
mthand
RTC Expired
*
Posts: 17


« on: October 31, 2014, 09:09:49 PM »

I am using RTC with XE7 and I must first say that it is GREAT.
I really appreciate your efforts and my purchase was well spent.

One issue I have been coming across is the timeout when connecting with mobile apps.
I have a multiplatform program that connects to our local desktop program, using RTCHttpClient calling various webservices.

Everything works great, except for one issue - when the Windows version fails to connect (a situation i can create just by shutting down our desktop program), the connection timeout occurrs quickly, in a few seconds, which i want.

But in the mobile versions - Android, IOS, and the simulator, the timeout is over 20 seconds.
I have experimented with all settings I could see regarding the HttpClient Timeout and also the TimeoutofAPI.

Do you know if the settings for timeouts need to be set in a certain way for the mobile platforms ?

Thanks
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: October 31, 2014, 09:23:12 PM »

If changing TimeoutsOfAPI parameters does not change the behavior of connection components, the problem is the API itself. Different APIs simply behave differently. Even on Windows, there are 4 different APIs supported and each will show slight differences in their behavior. And since Mobile devices usually run on slower networks and some of them even enforce HTTP Proxy usage, they will most likely have longer timeout periods.

Async WinSock, WinInet and WinHTTP APIs on Windows support manually setting the Connect timeout through the TimeoutsOfAPI property, which is used in the Connect API call. All the other APIs supported by RTC (which includes all non-Windows APIs as well as the blocking WinSock API on Windows) do NOT have support for manually setting the Connect timeout, so ... a single call to the Connect function of that API will either return when the connection was successfully established, or when the call times out (based on default timeout periods of that API). This is why RTC Connect Timeouts will have no effect on these APIs.

Best Regards,
Danijel Tkalcec
Logged
mthand
RTC Expired
*
Posts: 17


« Reply #2 on: October 31, 2014, 10:19:08 PM »

Thanks for the quick answer.
I went through setting one by one and I am seeing some improvements by setting the Timeout.AfterConnecting.
It seems like maybe sometimes it works, maybe not always.
I'll keep trying to narrow it down, I think I'm close.

Thanks for your quick response !
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 16 queries.