Beispiel #1
0
        internal void ACK(ushort seq, SendOptions channelType)
        {
            AckDetail ack = new AckDetail();

            ack.Init(seq, channelType);
            enqueudAcks.Enqueue(ack);
        }
Beispiel #2
0
 // writes as many enqued as as can fit into datagram
 private void WriteEnquedAcksToDatagram(Datagram datagram, int index)
 {
     while (enqueudAcks.Count > 0 && (datagram.MaxSize - (index - datagram.Offset)) > Const.FALCON_PACKET_HEADER_SIZE)
     {
         AckDetail ack = enqueudAcks.Dequeue();
         FalconHelper.WriteAck(ack, datagram.BackingBuffer, index);
         index += Const.FALCON_PACKET_HEADER_SIZE;
     }
     datagram.Resize(index - datagram.Offset);
 }
Beispiel #3
0
 internal static void WriteAck(AckDetail ack, byte[] dstBuffer, int dstIndex)
 {
     WriteFalconHeader(dstBuffer, dstIndex, PacketType.ACK, ack.Channel, ack.Seq, 0);
 }