Title: No connect error Post by: wbroyles 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 Title: Re: No connect error Post by: D.Tkalcec (RTC) 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 Title: Re: No connect error Post by: wbroyles on August 16, 2013, 01:45:11 PM Danijel,
It works for me. Thanks for the insight! Wade |