コード例 #1
0
        /**
         * process EXP event (see spec. p 13)
         */
        protected void ProcessEXPEvent()
        {
            if (session.Socket == null)
            {
                return;
            }
            UDTSender sender = session.Socket.GetSender();

            //put all the unacknowledged packets in the senders loss list
            sender.PutUnacknowledgedPacketsIntoLossList();
            if (expCount > 16 && (DateTime.Now.Ticks - sessionUpSince) / TicksMS > IDLE_TIMEOUT)
            {
                if (!connectionExpiryDisabled && !stopped)
                {
                    SendShutdown();
                    Stop();
                    FlashLogger.Info("Session " + session + " expired.");
                    return;
                }
            }
            if (!sender.HaveLostPackets())
            {
                SendKeepAlive();
            }
            expCount++;
        }
コード例 #2
0
 /**
  * @param host
  * @param port
  * @param endpoint
  * @throws SocketException,UnknownHostException
  */
 public UDTSocket(UDPEndPoint endpoint, UDTSession session)
 {
     this.endpoint = endpoint;
     this.session  = session;
     this.receiver = new UDTReceiver(session, endpoint);
     this.sender   = new UDTSender(session, endpoint);
 }
コード例 #3
0
 public void SetSender(UDTSender sender)
 {
     this.sender = sender;
 }