public UDTSender(UDTSession session, UDPEndPoint endpoint) { if (!session.isReady()) { Log.Write(this.ToString(), "UDTSession is not ready."); } this.endpoint = endpoint; this.session = session; statistics = session.getStatistics(); senderLossList = new SenderLossList(); sendBuffer = new Dictionary <long, DataPacket>(session.getFlowWindowSize()); sendQueue = new Queue <DataPacket>(1000); lastAckSequenceNumber = (int)session.getInitialSequenceNumber(); currentSequenceNumber = (int)session.getInitialSequenceNumber() - 1; waitForAckLatch.Set(new CountDownLatch(1)); waitForSeqAckLatch.Set(new CountDownLatch(1)); storeStatistics = false; //Boolean.getBoolean("udt.sender.storeStatistics"); initMetrics(); doStart(); }
public UDTSender(UDTSession session, UDPEndPoint endpoint) { if (!session.IsReady) { throw new IllegalStateException("UDTSession is not ready."); } this.endpoint = endpoint; this.session = session; statistics = session.Statistics; senderLossList = new SenderLossList(); sendBuffer = new ConcurrentDictionary <long, DataPacket>(session.FlowWindowSize, 2); sendQueue = new BlockingCollection <DataPacket>(1000); lastAckSequenceNumber = session.InitialSequenceNumber; currentSequenceNumber = session.InitialSequenceNumber - 1; //waitForAckLatch.set(new CountDownLatch(1)); //waitForSeqAckLatch.set(new CountDownLatch(1)); //storeStatistics=bool.getbool("udt.sender.storeStatistics"); InitMetrics(); DoStart(); }