D.Tkalcec (RTC)
|
|
« Reply #2 on: March 01, 2016, 10:38:25 AM » |
|
1. Use TimeoutsOfAPI properties on the TRtcHttpServer component to configure time-out values for your Server. The same property is also available on the TRtcHttpClient component, where you can define time-out values for the Client. This allows you to set all available timeouts for the API being used.
2. If you are asking how to disable the HTTP keep-alive, because you want to force a new connection to be opened for each new request and closed immediately afterwards (as in the old HTTP/1.0 protocol), instead of allowing the same connection to be re-used for several requests (as in the new HTTP/1.1 protocol and the default behavior of RTC), you can set the FixupRequest.ForceOldHttp10 property on the TRtcHttpClient component to TRUE.
But ... please keep in mind that disabling HTTP keep-alive or using HTTP/1.0 (which does not have keep-alive) will have a BIG impact on your Clients performance, especially if you are sending a lot of short requests, because opening and new connection takes time, especially over the Internet.
If you are facing a problem with a Server closing a "keep-alive" connection after a period of inactivity, without your Client being notified, an alternative to using HTTP/1.0 or disabling the HTTP keep-alive completely is to use the Timeouts property on the TRtcHttpClient component to have your Client close its connection automatically after a period of inactivity, assuming the connection might already be closed by the Server. This way, you can re-use the same connection when multiple requests are being sent without much delay, but have the connection closed if there was no traffic for a while.
3. To make your Server work with all mobile devices over the internet (provided you are NOT writing a Proxy, but a normal Server), set the FixupRequest.RemovePrefix property on your TRtcHttpServer component to TRUE.
This helps avoid problems with mobile internet service providers who use HTTP Proxies and assume the receiver is also a HTTP Proxy (instead of a normal Server), injecting the protocol (http:// or https://) and domain name into the URI when forwarding requests.
If none of the above solves your issue, then I will need more detailed information about the problem and the way you are using the RTC SDK.
Best Regards, Danijel Tkalcec
|