Why does .Net Socket.Disconnect take two minutes?

前端 未结 5 2104
庸人自扰
庸人自扰 2020-12-31 18:29

I am using .Net\'s socket class and I am using the following code:

socket.Shutdown(SocketShutdown.Both);
socket.Disconnect(true);

This then

5条回答
  •  孤独总比滥情好
    2020-12-31 19:16

    Turns out there is some registry entry which controls how long a disconnect takes. It has something to do with the WinSock2 api.

提交回复
热议问题