AnsweredAssumed Answered

how to change keepalive time for every socket in frdmk64 (KDS 2.0)

Question asked by sudhakar p on Jun 10, 2015
Latest reply on Jun 11, 2015 by Carlos_Musich


i tried following steps


client_sock= accept(conn_sock, &remote_sin, &remote_addrlen);

     option =60000;//for 1 minute

          retval = setsockopt(client_sock, SOL_TCP, OPT_KEEPALIVE,&option, sizeof(option));    

          if (retval != RTCS_OK)


              fputs("Fatal Error: Unable to set socket options.", stderr);



but after 1MINUTE its not disconnect the connection. still connection was there. why?. actually i want after some time the connection should shutdown if no data transfer between particular time. if i am doing anything wrong just correct me.



sudhakar p