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

SetOption() public method

public SetOption ( ChannelOption option, int value ) : bool
option ChannelOption
value int
return bool
        public bool SetOption(ChannelOption option, int value)
        {
            if (option != ChannelOption.MaxPendingBuffers)
            {
                return false;
            }
            if (!this.m_IsReliable)
            {
                if (LogFilter.logError)
                {
                    Debug.LogError("Cannot set MaxPendingBuffers on unreliable channel " + this.m_ChannelId);
                }
                return false;
            }
            if ((value < 0) || (value >= 0x200))
            {
                if (LogFilter.logError)
                {
                    Debug.LogError(string.Concat(new object[] { "Invalid MaxPendingBuffers for channel ", this.m_ChannelId, ". Must be greater than zero and less than ", 0x200 }));
                }
                return false;
            }
            this.m_MaxPendingPacketCount = value;
            return true;
        }