The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-15-2004
Registered User
 

Join Date: Oct 2004
Posts: 1
Stumble this Post!
Using TCP_KEEPALIVE

I would like to enable tcp keepalive packets for a particular socket in a C server application hosted on HPUX 11.00.
I'm trying to use the TCP_KEEPALIVE option:

struct t_kpalive kp_opts;
len = sizeof(struct t_kpalive);
kp_opts.kp_onoff = 1;
kp_opts.kp_timeout = 300;
ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &kp_opts, len);

But, when I get the new value of kp_opts, using getsockopt, this return to me "kp_opts.kp_onoff = 0". This means that I didn't change de timeout, right? Has anyone any ideas how to resolve the problem?

Thanks
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:41 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0