Lidgren.Network.NetConnection.GetSendQueueInfo C# (CSharp) Method

GetSendQueueInfo() public method

Zero windowSize indicates that the channel is not yet instantiated (used) Negative freeWindowSlots means this amount of messages are currently queued but delayed due to closed window
public GetSendQueueInfo ( NetDeliveryMethod method, int sequenceChannel, int &windowSize, int &freeWindowSlots ) : void
method NetDeliveryMethod
sequenceChannel int
windowSize int
freeWindowSlots int
return void
        public void GetSendQueueInfo(NetDeliveryMethod method, int sequenceChannel, out int windowSize, out int freeWindowSlots)
        {
            int channelSlot = (int)method - 1 + sequenceChannel;
            var chan = m_sendChannels[channelSlot];
            if (chan == null)
            {
                windowSize = NetUtility.GetWindowSize(method);
                freeWindowSlots = windowSize;
                return;
            }

            windowSize = chan.WindowSize;
            freeWindowSlots = chan.GetAllowedSends() - chan.m_queuedSends.Count;
            return;
        }