public SendChannel(SendOptions channelType, DatagramPool sendDatagramPool) { this.channelType = channelType; this.queue = new Queue <Datagram>(); this.datagramPool = sendDatagramPool; this.IsReliable = (channelType & SendOptions.Reliable) == SendOptions.Reliable; GetNewDatagram(); }
internal RemotePeer(FalconPeer localPeer, IPEndPoint endPoint, int peerId, bool keepAliveAndAutoFlush = true) { this.Id = peerId; this.localPeer = localPeer; this.endPoint = endPoint; #if DEBUG this.PeerName = endPoint.ToString(); #else this.PeerName = String.Empty; #endif this.unreadPacketCount = 0; this.sendDatagramsPool = new DatagramPool(FalconPeer.MaxDatagramSize, localPeer.PoolSizes.InitalNumSendDatagramsToPoolPerPeer); this.sentDatagramsAwaitingACK = new List <Datagram>(); this.qualityOfService = new QualityOfService(localPeer.LatencySampleSize, localPeer.ResendRatioSampleSize); this.delayedDatagrams = new List <DelayedDatagram>(); this.keepAliveAndAutoFlush = keepAliveAndAutoFlush; this.allUnreadPackets = new List <Packet>(); this.enqueudAcks = new Queue <AckDetail>(); CreateSendRecieveChannels(); }