0 Replies Latest reply on Mar 28, 2015 4:28 AM by shaunperry

    Coldfusion Socket Gateway in web application help

    shaunperry Level 1

      I've created a Java Socket Gateway in ColdFusion to talk to a 3rd party API.

       

      1.     User requests their credit balance by clicking a button.
      2.     On clicking the button, a socket is opened with the 3rd party server in CFML, it sends a gateway message (request for balance) and the template request ends. A listener CFC waits for a response, and receives data back 15 seconds later and deals with the results but in a different request.
      3.     I'm not sure how I give these results back to the user as it's not completed in the same request? Do I look at web sockets, node.js, CF web sockets or just poll with ajax?

       

      I'm new to socket communication and the api I'm using and unsure of how to proceed, can anyone offer any advice or tips?

       

      Cheers

       

      Shaun