You can set the socket options like this
_socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger, True)
If it does not work, try some other options
_socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger, false)
_Socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, True)
_Socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, 500)
_Socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendTimeout, Timeout)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…