/** * 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++; }
/** * @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); }
public void SetSender(UDTSender sender) { this.sender = sender; }