RTC Forums
November 24, 2024, 04:26:11 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: No connect error  (Read 4354 times)
wbroyles
RTC Expired
*
Posts: 21


« on: August 14, 2013, 05:02:11 PM »

A building a iOS app and testing it in win32. When the server side is running it connects and works fine. When the server side is not running and I try to connect I do not get a timeout connecting to server event from
RtcHttpClient1ConnectFail or from RtcClientModule1ConnectLost. I have tried adjusting the timeout values to no avail.

Version 6.20

Suggestions?

Thanks

Wade
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: August 14, 2013, 05:50:48 PM »

OnConnectLost and OnConnectFail are WinSock-only events, which won't fire if you are using any other API.

When using general HTTP requests (not remote functions), you can use the OnRepostCheck or OnResponseAbort events, which are available on the TRtcDataRequest component and will notify you when a request (after it was posted to the request queue) has been aborted - for whatever reason.

When working with remote functions, you can either use OnRepostCheck/OnResponseAbort events on the TRtcClientModule component, or ... you can use the RequestAborted event on the TRtcResult component.

Altrernatively, you can use the OnRepostCheck and/or OnResponseAbort events on the TRtcHttpClient component, in case you want to implement general connection error handling, indepenent of the request which was aborted.

NOTE: WinInet and WinHTTP APIs do not have a concept of a physical connection, but instead follow a concept of requests and responses. These APIs are used when useProxy=TRUE, useSSL=True or useWinHTTP=True. When using these APIs, the Connect/Disconnect events will trigger when the components are linked to the API, and NOT when a phisical connection is open or closed to the Server. This is why you should NOT rely on connection events, but instead use OnRepostCheck, OnResponseAbort and RequestAborted events to handle all kinds of connection problems on the Client side.

Best Regards,
Danijel Tkalcec
Logged
wbroyles
RTC Expired
*
Posts: 21


« Reply #2 on: August 16, 2013, 01:45:11 PM »

Danijel,

It works for me.

Thanks for the insight!

Wade
 
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.024 seconds with 17 queries.