PDA

View Full Version : Synchronous Socket Connection


ced-b
04-16-2007, 02:04 AM
I am currently working with a local socket connection to transfer data between a Java Application and an embedded SWF file.

Currently, I have it working in the asynchronous mode that ActionScript generally uses to connect to remote services. However, for the purpose of my application it would be much better if I could access the Socket in a synchronous fashion.

Essentially, I want to be able to provide a method like that:


function var send(aRequest:Request):Response {}


It should wait until the response comes back and then return it, rather than going on and waiting for an event to fire.

Does anyone know how to do that?

dr_zeus
04-16-2007, 05:28 PM
There is no way to pause code execution in a function until an asynchronous event is fired.