UnityEngine.Networking.ChannelBuffer.SendInternalBuffer C# (CSharp) Method

SendInternalBuffer() public method

public SendInternalBuffer ( ) : bool
return bool
        public bool SendInternalBuffer()
        {
            NetworkDetailStats.IncrementStat(NetworkDetailStats.NetworkDirection.Outgoing, 0x1d, "msg", 1);
            if (!this.m_IsReliable || (this.m_PendingPackets.Count <= 0))
            {
                return this.m_CurrentPacket.SendToTransport(this.m_Connection, this.m_ChannelId);
            }
            while (this.m_PendingPackets.Count > 0)
            {
                ChannelPacket packet = this.m_PendingPackets[0];
                if (!packet.SendToTransport(this.m_Connection, this.m_ChannelId))
                {
                    break;
                }
                pendingPacketCount--;
                this.m_PendingPackets.RemoveAt(0);
                FreePacket(packet);
                if (this.m_IsBroken && (this.m_PendingPackets.Count < (this.m_MaxPendingPacketCount / 2)))
                {
                    if (LogFilter.logWarn)
                    {
                        Debug.LogWarning("ChannelBuffer recovered from overflow but data was lost.");
                    }
                    this.m_IsBroken = false;
                }
            }
            return true;
        }