I am trying to reconnect to a socket that I have disconnected from but it won\'t allow it for some reason even though I called the Disconnect method with the argument \"reus
After reading the MSDN documentation for Socket.Disconnect I noticed something that might be causing your issue.
If you need to call Disconnect without first calling Shutdown, you can set the SocketOption named DontLinger to
falseand specify a nonzero time-out interval to ensure that data queued for outgoing transmission is sent. Disconnect then blocks until the data is sent or until the specified time-out expires. If you set DontLinger to false and specify a zero time-out interval, Close releases the connection and automatically discards outgoing queued data.
Try setting the DontLinger Socket option and specify a 0 timeout or use Shutdown before you call disconnect.