RTC Forums
November 25, 2024, 02:39:02 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
>
Correct settings for OnConnectFail/OnConnectError
Pages: [
1
]
« previous
next »
Print
Author
Topic: Correct settings for OnConnectFail/OnConnectError (Read 5723 times)
rloewy
Newbie
Posts: 3
Correct settings for OnConnectFail/OnConnectError
«
on:
June 16, 2010, 10:43:08 PM »
I am using a TRTCHttpClient where I implemented a OnConnectError and OnConnectFail events - which are never called.
Basically, if I disconnect the machine from the network before the trying to connect - the application never seems to get the error handlers called.
I have set ReconnectOn.ConnectError and ConnectFail to false, All timeout properties are set to 0, UseWinHTTP to false, MultiThreaded to true
Any idea what I am doing wrong?
Ron.
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Correct settings for OnConnectFail/OnConnectError
«
Reply #1 on:
June 16, 2010, 10:47:42 PM »
What is your "useProxy" property setting?
Logged
rloewy
Newbie
Posts: 3
Re: Correct settings for OnConnectFail/OnConnectError
«
Reply #2 on:
June 16, 2010, 10:55:50 PM »
Quote from: Danijel Tkalcec on June 16, 2010, 10:47:42 PM
What is your "useProxy" property setting?
It is set to True. Is that the cause of the issue?
Ron.
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Correct settings for OnConnectFail/OnConnectError
«
Reply #3 on:
June 16, 2010, 11:01:32 PM »
Yes. When you set "useProxy" to TRUE, WinInet API connection provider will be used which does not have the concept of physical connections, so that calling "Connect" will only prepare a connection while the actual task of "connecting" will be done transparently by WinInet at discrete times. When using the WinInet API, you will only get request-related events and the OnConnectLost event, which tells you that the request could not be successfully sent.
Best Regards,
Danijel Tkalcec
Logged
rloewy
Newbie
Posts: 3
Re: Correct settings for OnConnectFail/OnConnectError
«
Reply #4 on:
June 16, 2010, 11:02:42 PM »
Thanks,
I will give it a try.
All the best,
Ron.
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Correct settings for OnConnectFail/OnConnectError
«
Reply #5 on:
June 16, 2010, 11:16:51 PM »
Another important thing to know when using the WinInet API (when useProxy=TRUE and useWinHTTP=FALSE) is that the WinInet API will never open more than 2 physical connections to the same Server, regardless of how many TRtcHttpClient components you use. This has nothing to do with the RTC SDK, it is simply how the WinInet API works.
If your Clients do not have to work through a Proxy, leave the "useProxy" property FALSE to use the WinSock API which does not have that limitation and will trigger the OnConnectError or OnConnectFail event after you call Connect if the Server you are trying to connect to is inaccessible.
Best Regards,
Danijel Tkaclec
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...