UnityEngine.Networking.NetworkConnection.SetChannelOption C# (CSharp) Méthode

SetChannelOption() public méthode

This sets an option on the network channel.

public SetChannelOption ( int channelId, ChannelOption option, int value ) : bool
channelId int The channel the option will be set on.
option ChannelOption The option to set.
value int The value for the option.
Résultat bool
        public bool SetChannelOption(int channelId, ChannelOption option, int value)
        {
            if (this.m_Channels == null)
            {
                return false;
            }
            if ((channelId < 0) || (channelId >= this.m_Channels.Length))
            {
                return false;
            }
            return this.m_Channels[channelId].SetOption(option, value);
        }

Usage Example

 public override void OnServerConnect(NetworkConnection conn)
 {
     conn.SetChannelOption(Channels.DefaultReliable, ChannelOption.MaxPendingBuffers, 500);
 }