title: How to detect if there is some fire wall or other causes which prevent me to connect to a specific server?
body: <p>If my web application has a specific component(widget) which make a connection to another server(which is out of control) to read from an <code>xml file</code> .</p>
  
  <p>sometimes the admin of the server which i connect to put a firewall or change some configuration . and when my application try to connect to this server it takes long time before the widget comes empty.</p>
  
  <p>The problem is the time trying to connect to that server is a part of the time to load the page . and i feel there 's some thing wrong with all this time to request the page !</p>
  
  <hr>
  
  <p>How can i determine if i can connect to that server to read the data or there is some issue which prevent me to do this.?</p>