问题描述:

I'm working with HTML5 WebServices under node.js (https://github.com/Worlize/WebSocket-Node) and I was wondering if it's possible to emulate a classical request-response retrieval of data. Currently I send the request and get the response at another point in my code later. I want to implement functionality to add a contact and the client side of the WebService should wait until the server checks the database, updates the users contact list and returns whether the action succeeded or not. In the meanwhile I would display a "loading" message on the client side.

Thank you!

相关阅读:
Top