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.