- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Socket problem
Operating System - HP-UX
1755152
Members
4769
Online
108830
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2003 07:48 AM
тАО07-07-2003 07:48 AM
We have a c program that opens and connects a socket to one of our vendors for the purpose of exchanging information. We disconnect the socket after midnight using ndd disconnect by address. The problem we're having is, when we start the process in the morning, the socket status starts in "Established" mode and since their are no files to exchange with the vendor the socket goes into "Time_Wait" status which causes our program to fail and socket to disconnect. My workaround, was to send a single packet at startup across the connection. That makes the socket stay open even if no data was exchanged for a couple of hours. I would like to know why it only works when I send that packet. If someone has a solution or suggestion to how I can get it to start without the initial packet, please send me your thoughts.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2003 08:07 AM
тАО07-07-2003 08:07 AM
Solution
First of all using rather than using ndd to clobber the connections, I would rather see you code a signal handler to shutdown the socket more gracefully.
I suspect that you need to use setsockopt() to set SO_KEEPALIVE.
I suspect that you need to use setsockopt() to set SO_KEEPALIVE.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2003 08:12 AM
тАО07-07-2003 08:12 AM
Re: Socket problem
You can configure you time-wait interval
ndd -get /dev/tcp tcp_time_wait_interval
-> this shows your current setting.
To change it
ndd -set /dev/tcp/tcp_time_wait_interval (in seconds)
to make it permanent
change the setting in
/etc/rc.config.d/nddconf
ndd -get /dev/tcp tcp_time_wait_interval
-> this shows your current setting.
To change it
ndd -set /dev/tcp/tcp_time_wait_interval
to make it permanent
change the setting in
/etc/rc.config.d/nddconf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2003 12:41 PM
тАО07-07-2003 12:41 PM
Re: Socket problem
Hello!
If it's your code i don't think that it's
a good thing that your program not control
the close of connection, you should check the
source and made changes and the work with
signals will be fine for this.
Caesar
If it's your code i don't think that it's
a good thing that your program not control
the close of connection, you should check the
source and made changes and the work with
signals will be fine for this.
Caesar
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP