- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem about reading data on a TCP socket
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
02-12-2010 03:07 AM - last edited on 02-10-2014 08:51 PM by Lisa198503
02-12-2010 03:07 AM - last edited on 02-10-2014 08:51 PM by Lisa198503
Problem about reading data on a TCP socket
Hi,
I support an application compiled under HP10.20 and running on B2000 station under HP11.11, which is an HMI displaying data received from other equipments. This application is composed with several processes which one is dedicated to the communication between HMI processes and the application running under other equipments. The communication in this process is based on sockets and pipes : pipe with the HMI processes, socket UDP to manage the detection of clients, sockets TCP to receive and to send data from/to clients of other equipments when the connexion is established with them.
I think that the managment of the communications is classic :
- loop calling the select function to wait data from all the file descriptors of the sockets and pipes added through the FD_SET macro
- check the return of the select function
- if the return of select function > 0, detection of the file descriptor concerned through the FD_ISSET macro
- call recv function on the file descriptor concerned
Problem is that sometimes, when there is much traffic, the return of the select function is >0, the file descriptor detected is a TCP socket, but the recv function on this TCP socket returns 0. Our application treats that as a disconnexion !
How may you explain that the select function detects data on a socket (return>0) and that the recv function on this socket is unable to read the data (return=0)?
P.S. This thread has been moved from Workstations - Itanium-Based, hp9000, Visualize to HP-UX > networking. -HP Forum Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2010 04:44 PM
02-12-2010 04:44 PM
Re: Problem about reading data on a TCP socket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2010 12:31 AM - edited 02-10-2014 01:17 PM
02-14-2010 12:31 AM - edited 02-10-2014 01:17 PM
Re: Problem about reading data on a TCP socket
The correct forum for HP-UX networking questions is the EBC forum: HP-UX > networking:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2010 02:08 AM
02-15-2010 02:08 AM
Re: Problem about reading data on a TCP socket
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2010 04:37 PM - edited 02-10-2014 01:16 PM
02-15-2010 04:37 PM - edited 02-10-2014 01:16 PM