public virtual void Stop() { isUp = false; if (this.listener != null) { this.listener.Stop(); } mainLoop.Abort(); mainLoop = null; if (clientSocket != null) { clientSocket.Close(); } }
public virtual void Stop() { isUp = false; shutdown = true; if (this.listener != null) { this.listener.Stop(); } mainLoop = null; if (clientSocket != null) { clientSocket.Close(); } if (udpSocket != null) { var _socket = udpSocket; udpSocket = null; _socket.Close(); } }