RTC Forums

Subscription => Support => Topic started by: jpr on August 27, 2013, 10:23:18 AM



Title: Property TotalConnectionCount
Post by: jpr on August 27, 2013, 10:23:18 AM
Hi,

I just purchased the RTC SDK  ;D
I'm testing the property TotalConnectionCount with the project RTCWebServer.
I disconnected the file provider to have the message Status 400: Bad Request.
So in that config, I've got 2 for the property TotalConnectionCount when I tried to access to the page http://127.0.0.1/index.html
After 10 seconds one connection close and after one minute the other close.

Questions:
  - Why 2 connections ?
  - Why connections stay open ?

Regards,

JP


Title: Re: Property TotalConnectionCount
Post by: D.Tkalcec (RTC) on August 27, 2013, 10:49:40 AM
Unless you explicitly set Timeout values on the Server to close idle connections, or close the connections manually by calling Disconnect, the Client (in your case, the Web Browser) will decide how long a connection will stay open. The number of connections used to send Requests is also decided on the Client-side. The Server simply accepts connections and processes requests.

PS. It is good practice to allow connections to remain open for some time (normally up to 2 minutes) when they are NOT in use, because the process of opening and closing connections can be "expensive" and the user might want to send more requests to the Server. Most Browsers (and the WinInet API - used by the Internet Explorer and the RTC SDK when "useProxy=True") will keep a connection open for some time after use.

Best Regards,
Danijel Tkalcec