private void StartHsmsConnector() { this.mHsmsConnector = new SECSConnector(this.name, this.socketinfo); this.mHsmsConnector.OnConnected += new SocketEventHandler.ConnectEventHandler(this.OnConnected); this.mHsmsConnector.OnReadError += new SocketEvent.ReadErrorEventHandler(this.HandleReadError); this.mHsmsConnector.Logger = this.Logger; this.mHsmsConnector.Start(); }
private void StopHsmsConnector() { if (this.mHsmsConnector != null) { this.mHsmsConnector.Stop(); this.mHsmsConnector.OnConnected -= new SocketEventHandler.ConnectEventHandler(this.OnConnected); this.mHsmsConnector.OnReadError -= new SocketEvent.ReadErrorEventHandler(this.HandleReadError); this.mHsmsConnector = null; } }