public void Close() { if (socketClient == null) { return; } if (socketListener != null) { socketListener.StopListening(); } socketClient.Close(); socketListener = null; socketClient = null; }
public void Stop() { socketListener.StopListening(); clientSocket = null; }