private void StopMonitor() { if (m_monitorSocket != null) { m_monitorSocket.Close(); m_monitorSocket = null; m_monitorEvents = 0; } }