public byte AddChannel (Networking.QosType value);


value 追加する新しいチャンネルの設定


byte チャンネル ID、ユーザーはこの ID を使用することによってメッセージを送信することができます。


Adds a new channel to the configuration and returns the unique id of that channel.

Channels are logical delimiters of traffic between peers. Every time you send data to a peer, you should use two ids: connection id and channel id. Channels are not only logically separate traffic but could each be configured with a different quality of service (QOS). In the example below, a configuration is created containing two channels with Unreliable and Reliable QOS types. This configuration is then used for sending data.

ConnectionConfig myConfig = new ConnectionConfig();
int reliableChannelId = myConfig.AddChannel(QosType.UnReliable);
int unreliableChannelId = myConfig.AddChannel(QosType.Reliable);


NetworkTransport.Send(hostId, connection, reliableChannelId, data, data.Length, out error); //sends data via Reliable channel