HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Socket select call ?
Operating System - HP-UX
1833858
Members
3005
Online
110063
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
Forums
Discussions
Discussions
Discussions
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
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
04-23-2006 01:24 PM
04-23-2006 01:24 PM
Dear gurus,
our application vendor encountered some abnormal behaviour in their application developed on HP-UX 11i platform. They would like to know the following:
In what condition, a socket select call on read is completed but zero bytes being returned when application tried to read the socket with readsize of 1.
regards,
our application vendor encountered some abnormal behaviour in their application developed on HP-UX 11i platform. They would like to know the following:
In what condition, a socket select call on read is completed but zero bytes being returned when application tried to read the socket with readsize of 1.
regards,
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2006 11:02 PM
04-23-2006 11:02 PM
Re: Socket select call ?
when the remote close the socket, the select call is completed and zero will be read.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2006 12:17 PM
04-24-2006 12:17 PM
Solution
For a socket associated with a TCP connection a read return of zero indicates (as it does on virtually _all_ platforms) that the remote TCP has sent us a FINished segment meaning that we can expect to receive no more data from the remote.
What the local application should do with that knowledge will "depend." Depending on the application semantics, it could mean that the remote application is also no longer expecting to receive data from us.
It could also mean that the remote process died for some reason. When the process died, and all its file descriptors were close()'d that would have triggered the FIN to be sent.
For a socket associated with a UDP endpoint a zero byte return from read() et al means simply that someone sent use a zero-length UDP datagram.
For a socket associated with other protocols, it will depend on the protocol.
A read return of zero meaning remote close for TCP is a pretty fundamental thing. I would have expected an application vendor to be aware of that. If they were not, I would be somewhat concerned about their ability to write a "proper" sockets-using application.
What the local application should do with that knowledge will "depend." Depending on the application semantics, it could mean that the remote application is also no longer expecting to receive data from us.
It could also mean that the remote process died for some reason. When the process died, and all its file descriptors were close()'d that would have triggered the FIN to be sent.
For a socket associated with a UDP endpoint a zero byte return from read() et al means simply that someone sent use a zero-length UDP datagram.
For a socket associated with other protocols, it will depend on the protocol.
A read return of zero meaning remote close for TCP is a pretty fundamental thing. I would have expected an application vendor to be aware of that. If they were not, I would be somewhat concerned about their ability to write a "proper" sockets-using application.
there is no rest for the wicked yet the virtuous have no pillows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2006 01:54 PM
04-25-2006 01:54 PM
Re: Socket select call ?
thanku all
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.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP