Skip to main content

ConnectionChannel

A class in Root.Township, Alta.Networking.

A ScriptableObject that defines a network message channel: reliable or not, quality of service, and how clients queue what they receive.

Constructors​

MemberWhat it is
ConnectionChannel()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

4 private and internal fields
MemberWhat it is
private bool isReliableWhether messages on this channel are sent reliably; picks transport channel 0 (reliable) or 1 (unreliable) in Initialize.
private float maximumSendIntervalLongest time in seconds (default 0.03) between sends on this channel.
private QosType qualityOfServiceUnity networking QoS type for the channel, exposed as QualityOfService.
private ConnectionReceiverType receiverTypeClient: which receiver (timed queue, counted queue or normal) handles incoming messages. The server always uses a normal receiver.

Properties​

MemberWhat it is
int Identifier { get; private set; }Index given to the channel by Initialize.
bool IsReliable { get; }Whether messages on this channel are reliable.
float MaximumSendInterval { get; }Longest time in seconds between sends on this channel (default 0.03).
QosType QualityOfService { get; }The Unity networking QoS type set on the asset.
int TransportChannel { get; protected set; }The transport channel used: 0 for reliable, 1 for unreliable.

Methods​

MemberWhat it is
virtual ConnectionReceiver CreateConnectionReceiver(Connection connection)Makes the receiver for a connection. The server always uses a normal receiver; clients use the timed, counted or normal type set on the asset.
void Initialize(int identifier)Sets the channel's identifier and picks the transport channel (0 for reliable, 1 for unreliable).

Used in​

Members of other types that take, return or hold a ConnectionChannel:

Connection.channels, Connection.Connection, Connection.DefaultChannel, Connection.InternalSend, Connection.packetManagerMap, Connection.Send, EntityMessageHandler.SendToChunks, EntityMessageHandler.SendToPlayer, FakeSocket.DefaultChannel, FakeSocket.SendToAll, FakeSocket.SendToPlayers, INetworkScene.ChunkSyncChannel, ConnectionReceiver.channel, ConnectionReceiver.ConnectionReceiver, CountedQueuedConnectionReceiver.CountedQueuedConnectionReceiver, MessageProcessor.HandleMessage, MessageProcessor.ProcessSingleMessageFromData, NormalConnectionReceiver.NormalConnectionReceiver, OutgoingPacketManager.Channel, OutgoingPacketManager.OutgoingPacketManager, Packet.Send, QueuedConnectionReceiver.QueuedConnectionReceiver, SceneSerializer.SerializationChannel, TimedQueuedConnectionReceiver.TimedQueuedConnectionReceiver, InternalMessage.SendToPlayers, InternalMessage.SendToServer, ISocket.DefaultChannel, ISocket.SendToAll, ISocket.SendToPlayers, NetworkEntity.SyncChannel, NetworkingSettings.channels, NetworkingSettings.Channels, NetworkingSettings.defaultChannel, NetworkingSettings.DefaultChannel, NetworkScene.chunkSyncChannel, NetworkScene.ChunkSyncChannel, NetworkScene.serializationChannel, PacketSentHandler.BeginInvoke, PacketSentHandler.Invoke, ServerPacketReceiver.channels, Socket.Channels, Socket.DefaultChannel, Socket.SendToAll, Socket.SendToPlayers, Socket.Socket, ConnectionChannelStatistic.channel, ConnectionChannelStatistic.Channel, ConnectionChannelStatistics.ConnectionChannelStatistics, CachedSyncChannel.cache, CachedSyncChannel.returnTo, LocalNetworkScene.ChunkSyncChannel.