RTC Forums
November 24, 2024, 06:28:03 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
Connection Timeout on Android
Pages: [
1
]
« previous
next »
Print
Author
Topic: Connection Timeout on Android (Read 4777 times)
ISIGest
RTC Expired
Posts: 121
Connection Timeout on Android
«
on:
March 26, 2015, 10:18:32 AM »
How can I specific the connection timeout on Android?
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Connection Timeout on Android
«
Reply #1 on:
March 26, 2015, 12:16:58 PM »
Blocking sockets API for Android (used for TCP/IP communication by RTC) does NOT have options for manually setting a connection timeout. Only sending and receiving timeouts can be configured by using the
TimeoutsOfAPI
ReceiveTimeout and SendTimeout properties on the TRtcHttpClient component.
Best Regards,
Danijel Tkalcec
Logged
ISIGest
RTC Expired
Posts: 121
Re: Connection Timeout on Android
«
Reply #2 on:
March 27, 2015, 08:05:51 AM »
Oh yes I've setted it but with an HttpCLient.AutoConnect := True the connection stay busy for a long time
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Connection Timeout on Android
«
Reply #3 on:
March 27, 2015, 08:17:50 AM »
Unfortunately, the time it takes for a connection to get opened is not under our control and the connect timeout period is controlled at the OS level, but I don't think a long timeout should be an issue. The problem would be if you would use too short timeouts, which would interrupt the connection process before it had enough time to get completed. Please note that mobile devices are usually working through mobile networks with high latency, because of which the time it takes for a connection to get opened will usually be much longer than on desktop machines, so the timeout values set up at the OS level will also be higher by default than on desktop machines.
Best Regards,
Danijel Tkalcec
Logged
ISIGest
RTC Expired
Posts: 121
Re: Connection Timeout on Android
«
Reply #4 on:
March 27, 2015, 09:08:48 AM »
The only method is to manage a custom CallFunction method of TModuleClient that start a TTimer to check connection state.
If when TTimer is fired the HTTPClient property IsConnecting is true then I call DisconnectNow(True) method.
Thanks
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...