public void Close() { lock (this) { if (_socket == null) return; _socket?.Close(); _socket?.Dispose(); _socket = null; } }