Skip to main content
Known Participant
Mar 3, 2017 4:35 PM UTC
Question

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!

This topic is closed to new replies. Start a new post to keep the conversation going.

14 replies

PhendraxAuthor
Known Participant
Mar 29, 2017 2:51 PM UTC

Up....

Translate
PhendraxAuthor
Known Participant
Mar 15, 2017 4:48 PM UTC

Up \o/

Translate
PhendraxAuthor
Known Participant
Mar 9, 2017 9:21 AM UTC

Up, maybe

Translate