NetSim Source Code Help
Loading...
Searching...
No Matches
DelayedAck.c
Go to the documentation of this file.
1/************************************************************************************
2* Copyright (C) 2020 *
3* TETCOS, Bangalore. India *
4* *
5* Tetcos owns the intellectual property rights in the Product and its content. *
6* The copying, redistribution, reselling or publication of any or all of the *
7* Product or its content without express prior written consent of Tetcos is *
8* prohibited. Ownership and / or any other right relating to the software and all *
9* intellectual property rights therein shall remain at all times with Tetcos. *
10* *
11* Author: Shashi Kant Suman *
12* *
13* ---------------------------------------------------------------------------------*/
14#include "main.h"
15#include "TCP.h"
16
18{
19 s->tcb->ackType = tcp->ackType;
21 s->tcb->isAckSentLastTime = false;
22}
23
25{
27 return true;
28
29 if (s->tcb->lastAckSendTime +
31 {
33 s->tcb->isAckSentLastTime = true;
34 return true;
35 }
36 else
37 {
38 if (s->tcb->isAckSentLastTime)
39 {
40 s->tcb->isAckSentLastTime = false;
41 return false;
42 }
43 else
44 {
46 s->tcb->isAckSentLastTime = true;
47 return true;
48 }
49 }
50}
void set_ack_type(PNETSIM_SOCKET s, PTCP_DEV_VAR tcp)
Definition: DelayedAck.c:17
bool send_ack_or_not(PNETSIM_SOCKET s)
Definition: DelayedAck.c:24
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
Definition: Stack.h:837
@ TCPACKTYPE_UNDELAYED
Definition: TCP.h:83
PTCB tcb
Definition: TCP.h:132
double dDelayedAckTime
Definition: TCP.h:152
TCPACKTYPE ackType
Definition: TCP.h:150