Exemple #1
0
 public SequencedTeleportChannel(BaseTeleportChannel internalChannel, bool sendAcks) : base(internalChannel)
 {
     _sendAcks                  = sendAcks;
     _outgoingSequence          = 0;
     _lastReceiveIndex          = -1;
     _lastProcessedReceiveIndex = -1;
     _inbox            = new Dictionary <ushort, InboxItem>();
     _outbox           = new Dictionary <ushort, OutboxItem>();
     _outboxLock       = new object();
     _pendingAcksQueue = new ArrayQueue <ushort>(8096);
 }
        private BaseTeleportChannel[] CreateChannels()
        {
            var channelCount = _channelCreators.Length;
            var channels     = new BaseTeleportChannel[channelCount];

            for (int i = 0; i < channelCount; i++)
            {
                channels[i] = _channelCreators[i]();
            }
            return(channels);
        }
Exemple #3
0
 public SequencedTeleportChannel(BaseTeleportChannel internalChannel) : this(internalChannel, true)
 {
 }
Exemple #4
0
 public AggregatingTeleportChannel(BaseTeleportChannel internalChannel) : base(internalChannel)
 {
     _receiveLeftovers       = new byte[1024];
     _receiveLeftoversLength = 0;
 }
 private void ReceiveIncomingChannelData(BaseTeleportChannel channel, byte[] data, int startIndex, int length, EndPoint endpoint, EndpointCollection endpointCollection)
 {
     endpointCollection.Ping(endpoint);
     channel.Receive(data, startIndex, length);
 }