Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

read system call hangs

18 views
Skip to first unread message

Jaydeep Chovatia

unread,
May 21, 2012, 6:01:32 PM5/21/12
to
Hi,

I am using "read" system call in my C++ project to read data from sockets. I have also set read timeout (SO_RCVTIMEO) to 5 seconds using "setsockopt", but when I run my application under load run then sometimes this "read" system call hangs, it neither returns data nor it times out.

Any suggestion/help would be appreciated.

Thank you,
Jaydeep

Ian Collins

unread,
May 21, 2012, 6:07:51 PM5/21/12
to
The best one I can offer here to to post to comp.unix.programmer where
socket programming is topical.

--
Ian Collins

Jorgen Grahn

unread,
May 22, 2012, 8:36:31 AM5/22/12
to
On Mon, 2012-05-21, Ian Collins wrote:
> On 05/22/12 10:01 AM, Jaydeep Chovatia wrote:
>> Hi,
>>
>> I am using "read" system call in my C++ project to read data from sockets. [...]
>>
>> Any suggestion/help would be appreciated.
>
> The best one I can offer here to to post to comp.unix.programmer where
> socket programming is topical.

Or comp.protocols.tcp-ip which deals with (among other things)
socket programming no matter what the OS is.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
0 new messages