Products

Price/Order

Support

Partners

Testimonials

Test Results

About us

Contact
 Error codes, diagnostics
Bottom
 
Total posts: 3
 Author Error codes, diagnostics
Andrew W.

08.07.2009 13:04:35
Registered user
Hello all

I'm starting my first project with RTC.

Can anyone help on how I obtain diagnostic or error information? If there are examples in the current demo library please let me know.

The kind of scenario I'm interested in is this: suppose a client tries to connect to a server, and this attempt fails. How can I as a programmer writing the client get information about the nature of the error, so s to give the support guys in the next room a chance to diagnose the fault.

Please feel free to give me best practice advice as well. Should I be using autoconnect for instance?
Stephen Mott

10.07.2009 15:22:17
Registered user
I'm not really sure error codes are of much use, you can get to things like TRtcDataClient(Sender).Response.StatusCode but all this is going to tell you is the 200/404 type HTTP errors.

What you'd normally do is connect up the OnConnectError, OnConnectFail, OnConnectLost events, then handle the failure as you see fit (e.g. retry, or tell the user theres a problem). Then if required adjust your Timerout/TimeoutsOfAPI's and ReconnectOn values to match your scenario, though defaults will be OK for most.

From a support POV, if your connection events are linked up, you should be able to tell if it's a connection issue or not, but bear in mind this is a client/server API, so if the physical connection is OK, it's up to you as to what the server returns.

I tend to have AutoConnect:=True it saves the hassle of having to do a manual Connect/Disconnect, but its similar to just doing Connect(False), since both won't connect until they have to do something (although ISTR AutoConnect also Disconnects when its finished too, which saves server resources).

Steve..
Andrew W.

11.07.2009 16:15:25
Registered user
Thanks for the info, very useful.