HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- TCP Send returns 0 bytes in HP UX 11.0
Operating System - HP-UX
1833530
Members
3027
Online
110061
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-25-2002 10:55 AM
04-25-2002 10:55 AM
Hi:
Under heavy network and using
tcp sockets in HP UX 11.0.
Repeatedly calls using sendto,
occasionally will return 0 bytes, but have no errors.
Has anyone experience this problem and what can one do to remedy the problem?
Thanks in advanced.
Under heavy network and using
tcp sockets in HP UX 11.0.
Repeatedly calls using sendto,
occasionally will return 0 bytes, but have no errors.
Has anyone experience this problem and what can one do to remedy the problem?
Thanks in advanced.
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2002 11:33 PM
04-28-2002 11:33 PM
Solution
This is normal behaviour when you are using non-blocking sockets. Simply, it means the network layer is not able to transmit the data at the rate the application is sending it, hence the socket's send buffer has filled up. Here is the relevant section from the send(2) man page:
"If the O_NDELAY flag is set using fcntl() (defined in and explained in fcntl(2) and fcntl(5) ), nonblocking I/O is enabled. In this case, the send() request completes in one of three ways:
If there is enough space available in the system to buffer all of the data, send() completes successfully, having written out all of the data, and returns the number of bytes written.
If there is not enough space in the buffer to write out the entire request, send() completes successfully, having written as much data as possible, and returns the number of bytes it was able to write.
If there is no space in the system to buffer any of the data, send() completes successfully, having written no data, and returns 0. "
You have a couple of choices in handling this:
- use select() to find out when the socket is once again ready for writing
- don't use non-blocking sockets so that the send() call will block until all data is sent.
Regards,
Steve
"If the O_NDELAY flag is set using fcntl() (defined in
If there is enough space available in the system to buffer all of the data, send() completes successfully, having written out all of the data, and returns the number of bytes written.
If there is not enough space in the buffer to write out the entire request, send() completes successfully, having written as much data as possible, and returns the number of bytes it was able to write.
If there is no space in the system to buffer any of the data, send() completes successfully, having written no data, and returns 0. "
You have a couple of choices in handling this:
- use select() to find out when the socket is once again ready for writing
- don't use non-blocking sockets so that the send() call will block until all data is sent.
Regards,
Steve
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