17void set_ack_type(PNETSIM_SOCKET s, PTCP_DEV_VAR tcp)
19 s->tcb->ackType = tcp->ackType;
20 s->tcb->delayedAckTime = tcp->dDelayedAckTime;
21 s->tcb->isAckSentLastTime =
false;
24bool send_ack_or_not(PNETSIM_SOCKET s)
26 if (s->tcb->ackType == TCPACKTYPE_UNDELAYED)
29 if (s->tcb->lastAckSendTime +
30 s->tcb->delayedAckTime <= pstruEventDetails->dEventTime)
32 s->tcb->lastAckSendTime = pstruEventDetails->dEventTime;
33 s->tcb->isAckSentLastTime =
true;
38 if (s->tcb->isAckSentLastTime)
40 s->tcb->isAckSentLastTime =
false;
45 s->tcb->lastAckSendTime = pstruEventDetails->dEventTime;
46 s->tcb->isAckSentLastTime =
true;