I've created a Java Socket Gateway in ColdFusion to talk to a 3rd party API.
- User requests their credit balance by clicking a button.
- 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.
- 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