It seems that using socket.Close() for a tcp socket, doesn\'t fully close the socket. In the following example I\'m trying to connect to example.com at port 9999, which is not o
You're calling *Begin*Connect
- so doing it asynchronously. You're quite possibly trying to close the socket before it's even connected - so when it then connects, it remains open.
Try connecting synchronously - or closing it in OnSocketConnected
so you can see the effect of closing a genuinely connected socket.