XTCP LWIP: how to handle TCP timeouts

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
magnus
Member
Posts: 9
Joined: Tue Aug 06, 2019 8:40 pm

XTCP LWIP: how to handle TCP timeouts

Postby magnus » Fri Apr 17, 2020 1:01 pm

Hi,

It seems to me that the XTCP LWIP stack does not have a way to handle TCP timeouts?
I expected the XTCP_TIMED_OUT event to be fired but while debugging I noticed that it is never used within lib_xtcp (only the uip stack).

Confusingly the api/xtcp.h file does expose the following enum:

Code: Select all

typedef enum {
  ARP_TIMEOUT = 0,
  AUTOIP_TIMEOUT,
  TCP_TIMEOUT,
  IGMP_TIMEOUT,
  DHCP_COARSE_TIMEOUT,
  DHCP_FINE_TIMEOUT,
  NUM_TIMEOUTS
} xtcp_lwip_timeout_type;
But I don't know how I'd use it for anything related to the API.

Have I missed something?
User avatar
akp
Respected Member
Posts: 406
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Mon Apr 20, 2020 12:54 pm

That xtcp_lwip_timeout_type is used for firing periodic functions. Are you finding an unexpected behaviour?
magnus
Member
Posts: 9
Joined: Tue Aug 06, 2019 8:40 pm

Postby magnus » Mon Apr 20, 2020 1:44 pm

But that seems to be only used internally? (I was just confused whether I could use it for anything since it is in the api header)

The problem I have is that my application never gets notified that a TCP connection has timed out. So if, for whatever reason, a TCP connection has timed out I will never notice and reclaim the resources that have been reserved.

Who is online

Users browsing this forum: No registered users and 3 guests