public void Dispose() { if (InternalSocketServer != null && !IsDisposed) { IsDisposed = true; InternalSocketServer.Disconnect(false); InternalSocketServer.Dispose(); } }