Example #1
0
        internal ReliableChannel(byte channelId, Connection connection, SocketConfig config, MemoryManager memoryManager)
        {
            this.channelId     = channelId;
            this.connection    = connection;
            this.config        = config;
            this.memoryManager = memoryManager;

            _sendSequencer = new HeapableFixedDictionary <PendingOutgoingPacket>(config.ReliabilityWindowSize, memoryManager);
            _lastAckTimes  = new SlidingWindow <NetTime>(config.ReliableAckFlowWindowSize);
        }
        internal ReliableSequencedFragmentedChannel(byte channelId, Connection connection, SocketConfig config, MemoryManager memoryManager)
        {
            this.channelId     = channelId;
            this.connection    = connection;
            this.config        = config;
            this.memoryManager = memoryManager;

            // Alloc the in flight windows for receive and send
            _receiveSequencer = new HeapableFixedDictionary <PendingIncomingPacketFragmented>(config.ReliabilityWindowSize, memoryManager);
            _sendSequencer    = new HeapableFixedDictionary <PendingOutgoingPacketFragmented>(config.ReliabilityWindowSize, memoryManager);
        }