Home > Software engineering >  DisconnectEx call it take long to return
DisconnectEx call it take long to return

Time:09-19

DisconnectEx
Synchronous calls for about 2 minutes to return, this is the legendary TIME_WAIT
Asynchronous calls GetQueuedCompletionStatus function is about 2 minutes or so notified

Low efficiency is good, is there any way to DisconnectEx immediately return, close the socket success.

Set the
LINGER LINGER={1, 0};
: : setsockopt (s, SOL_SOCKET, SO_LINGER, (char *) & amp; Linger, sizeof (linger));

But don't rev. Still waiting for 2 minutes.

A warrior can
?
  • Related