Forum Discussion
Altera_Forum
Honored Contributor
14 years agoThank you Chris72 of your interest.
I have found some start of way in : /altera.components/Nios II Software Packages/altera_iniche/UCOSII/src/tcp/tcp_timr.h There are few# define like :#define TCPTV_KEEP_INIT (75*PR_SLOWHZ) /* initial connect keep alive */
# define TCPTV_KEEP_IDLE (120*60*PR_SLOWHZ) /* dflt time before probing */
# define TCPTV_KEEPINTVL (75*PR_SLOWHZ) /* default probe interval */
# define TCPTV_KEEPCNT 8 /* max probes before drop */
I'have try to change the TCPTV_KEEP_IDLE value to 5*60 (from 2h to 5 minutes) and add the lines : if (setsockopt(fd_listen, SOL_SOCKET, SO_KEEPALIVE, &sockval, sizeof(sockval)) == -1)
{
printf("Warning : KeepAlive option set failed\n");
} after the socket() call. But it doesn't work, or not like i hope. To be countinued...