0 Replies Latest reply on Dec 13, 2007 6:32 AM by ChuckWWW

    Fast results for createObject/sock.init call?

      <cfset sock = createObject( "java", "java.net.Socket" )>
      <cfset sock.init( "myserver.hostname.edu", 381)>
      <!--- call the isConnected() method --->
      <cfset success = sock.isConnected()>

      This code works, but when the server doesn't respond, it takes a while and does a timeout with the error "Object Instantiation Exception." How can I get "instant" results for sock.isConnected() in the case that there is no response? If the connect is "YES" it will be pretty much instant. How can I instantly get a "NO" ?


      Chuck Wyatt
      Clark University