RTC Forums
November 23, 2024, 11:39:17 PM
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
>
on connect
Pages: [
1
]
« previous
next »
Print
Author
Topic: on connect (Read 4565 times)
Ronald van Tour
RTC License++
Posts: 37
on connect
«
on:
September 27, 2010, 08:59:59 AM »
I use the Onconnect, Onconnectfail and Onconnectlost events to determine wheter there is a RTCconnection or not.
This works fine.
When UseProxy is set to True, something goes wrong.
The RTCHttpClient says its connected even when the server program is turned off.
Or even when there is no LAN connection at all.
Is there someway to fix this problem?
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: on connect
«
Reply #1 on:
September 27, 2010, 09:24:08 AM »
There is nothing wrong. That is simply how WinInet and WinHTTP APIs work. When you connect using the WinInet or WinHTTP API, you have no direct control over physical connections. The WinInet and WinHTTP APIs decide for themselves when a connection is required and open/close connections as they see fit. A connection is usually opened when a request has to be sent and closed after a response is received. If you are using the WinInet or WinHTTP API (useProxy=True or UseWinHTTP=True), you will get the OnConnect after the RTC SDK opens a connection to the API and OnDisconnect events when the API says a connection was closed by force.
When using the HTTP protocol you should generally NOT rely on information about physical connection status when there is no data being sent nor received. The only time the information about a connection status should matter is when data has to be sent or received (sending a request and receiving a response on the client side, receiving a request and sending a response on the server side).
Best Regards,
Danijel Tkalcec
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...