Operating System - HP-UX
1830899 Members
2742 Online
110017 Solutions
New Discussion

answer delay of read() on a socket

 
DUPETY
New Member

answer delay of read() on a socket

Function read() in C takes until two seconds for answering.
Does someone know if there is a patch on HP-UX11 or a specific code to avoid tis problem
1 REPLY 1
Adam J Markiewicz
Trusted Contributor

Re: answer delay of read() on a socket

At the first site I wouldn't expect any problem with read() that should be patched. The behaviour depends on many attributes:

The main two, which you don't tell are:

1. What type of protocol is used (datagram / stream)?
2. Is socket set into nonblocking mode?

To be honest I think that you are trying to read more data that is actually available. So this behaviour is quite correct unless you set another mode.

Adam
I do everything perfectly, except from my mistakes