Skip navigation
Currently Being Moderated

Socket Connectivity at Startup

Jul 27, 2009 5:43 AM

I'm having trouble with the socket connector in my AIR 1.5 HTML/JavaScript implementation.  It seems that the application never detects as being online at startup.


        socketMonitor = new air.SocketMonitor('', 80);


Then, when the document is ready (jQuery $(document).ready), I run the following code.


   if (socketMonitor.available) {


At launch, my function never triggers.  If I put that same code in a separate function and run it on a click event after the application loads, then it triggers just fine and finds socketMonitor.available to be true.


It seems that it is taking a while for the socket monitor to recognize that it is online.  Why would that be?  Any suggestions for how to know AT STARTUP if the application is online or not?


More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points