I have a working red5 application and I am using MultiThreadedApplicationAdapter but the multi threading doesn't really work. Here is the example, what I want it to do is to have multiple clients call test() and returns without blocking other clients. However what happened is the second client has to wait for the first client finish then execute test(). Any idea how to make this work? Thanks.
public class Application extends MultiThreadedApplicationAdapter {
public void test()
{
System.out.println("test "+System.currentTimeMillis());
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
The client side code looks like this
conn.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
conn.connect(server);
conn.call("test",null);