public void CloseClient() { if (pc != null) { pc.close(); //pc.poll(); if (this.closeEvent != null) { this.closeEvent(); } pc = null; this.UpdateClient(); } }