/* This method is called a communication error has been encountered */ protected override void OnCommunicationError() { /* Enqueue the one byte message in the FIFO queue */ byte[] cmd = new byte[1] { INT_CMD_RECONNECT }; IntraThreadMsg msg = new IntraThreadMsg { data = cmd }; queue.Add(msg); }
/* This method adds the message in the FIFO queue */ protected override void EnqueueCommand(byte[] cmd) { IntraThreadMsg msg = new IntraThreadMsg { data = cmd }; queue.Add(msg); }
/* This method is called when the user wants to terminate the connection */ public void Terminate() { /* Enqueue the one byte message in the FIFO queue */ StopReconnect = true; byte[] cmd = new byte[1] { INT_CMD_TERMINATE }; IntraThreadMsg msg = new IntraThreadMsg { data = cmd }; queue.Add(msg); }