DatagramSocket#close() takes 2 seconds
Hi,
I'm using UDP sockets in my project, and I found that when I close a DatagramSocket, my app freezes for approximatly 2 seconds
I have no idea why this is happening, is it a bug? is there a workaround?
here is a sample code that reproduces the issue:
var s:DatagramSocket = new DatagramSocket();
s.bind();
s.connect("127.0.0.1",9977);
s.receive();
setTimeout(function():void {
var t:int = getTimer();
s.close();
trace((getTimer()-t)+"ms"); // prints "2000ms"
}, 1000);
PS: Also, it would be great if multicast was supported with AIR DatagramSocket!
