public void SendAck(byte channelID)
        {
            ushort ack;
            uint   ackBits;

            receivedPackets.GenerateAckBits(out ack, out ackBits);

            byte[] transmitData = BufferPool.GetBuffer(16);
            int    headerBytes  = PacketIO.WriteAckPacket(transmitData, channelID, ack, ackBits);

            config.TransmitPacketCallback(transmitData, headerBytes);

            BufferPool.ReturnBuffer(transmitData);
        }
예제 #2
0
        public void SendAck(byte channelID)
        {
            ushort ack;
            uint   ackBits;

            lock (receivedPackets)
            {
                receivedPackets.GenerateAckBits(out ack, out ackBits);
            }
            byte[] buffer = BufferPool.GetBuffer(16);
            int    arg    = PacketIO.WriteAckPacket(buffer, channelID, ack, ackBits);

            config.TransmitPacketCallback(buffer, arg);
            BufferPool.ReturnBuffer(buffer);
        }