We have our own web-services on our own servers and use them all the time
for all sorts of purposes and don't experience problems in using them so I
know they're running fine.

>From the iPhone I was regularly getting timeouts getting a connection. So
steps I took to progress...

1. Using the Reachability classes - before every attempt to use my
web-service, I created an instance of the Reachability class and did a
IsHostReachable() check before calling my own methods. My application
generally requires most flows to be done in a linear manner.

2. I was doing the IsHostReachable() check synchronously which meant that if
the host was unreachable, ie. no internet connection, that check itself was
taking a long time to return.

3. Next, I put the IsHostReachable() into it's own thread, but since I was
still creating a new call to 
IsHostReachable() in the thread, the call was still potentially taking a
long time to return.

4. Where I'm at now and hopefully the Reachability classes are doing the
right thing, is creating a new Thread that exists throughout the application
session, and use call-back type mechanism that maintains the status of the
"reachability". Then before I use any of my web-services, I will just check
the "reachability status" to determine if a net-connection exists rather
than call IsHostReachable().

Does this sound like a sensible approach?























My current code was using the Reachability classes to determine if an
internet connection existed before making

--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Web-services-vs-other-tp3997150p3998074.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to