示例#1
0
        protected bool SendCommandAck(byte[] packet, int sequenceId)
        {
            int tryNum = 0;

            CommandReceiver.SetCommandReceived("SEND_WITH_ACK", sequenceId, false);

            while (tryNum < MaxPacketRetries && !CommandReceiver.IsCommandReceived("SEND_WITH_ACK", sequenceId))
            {
                SafeSend(packet);
                tryNum++;
                SmartSleep(250);
            }

            return(CommandReceiver.IsCommandReceived("SEND_WITH_ACK", sequenceId));
        }