internal RemoteChannelBase(ushort id, RemoteChannelType type, NetMessenger messenger)
        {
            this.Id        = id;
            this.Type      = type;
            this.Messenger = messenger;

            Events           = new ConcurrentDictionary <string, RemoteEvent>();
            Functions        = new ConcurrentDictionary <string, RemoteFunction>();
            WaitingFunctions = new ConcurrentDictionary <ushort, RemoteFunctionCallback>();
        }
        public NetConnection(IPEndPoint endPoint, NetMessenger messenger)
        {
            this.messenger = messenger;
            EndPoint       = endPoint;

            Stats = new NetConnectionStats();

            handledPacketIds                   = new ConcurrentUniqueList <ushort>();
            reliableOutboundPacketQueue        = new ConcurrentDictionary <ushort, ReliablePacket>();
            reliableOrderedOutboundPacketQueue = new ConcurrentQueue <ReliablePacket>();
            packetChunkQueue                   = new ConcurrentHashSet <NetOutboundPacket>();
            Partials = new ConcurrentDictionary <ushort, NetMessenger.PartialPacket>();

            config = messenger.GetBaseConfig();

            // Ensure we don't immediatly time out or send a ping request
            lastPingRequest  = NetTime.Now + 1000;
            lastPingResponse = NetTime.Now;

            PacketSendRate = 79;
        }
 internal RemoteChannel(NetMessenger messenger, ushort id)
     : base(id, RemoteChannelType.Normal, messenger)
 {
 }
 internal StateRemoteChannel(NetMessenger messenger, ushort id)
     : base(id, RemoteChannelType.State, messenger)
 {
 }
 internal CoreRemoteChannel(NetMessenger messenger, ushort id)
     : base(id, RemoteChannelType.Core, messenger)
 {
 }