[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-cxx-dev
Subject:    Re: CXX-DEV: aCC query:Problem using SO_RCVTIMEO in setsockopt
From:       "Prashun Gupta" <prashung () iin ! com>
Date:       2004-10-28 4:43:33
Message-ID: 005e01c4bca9$a776eb60$cd1ba4a4 () cslpnm ! com
[Download RAW message or body]

Select seems to be a good option.

There is blocking read and a non blocking read and another is timeout
argument to select.

I think your problem should get resolved by select.

Prashun
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------
Prashun Gupta
Tekmark Compucom International Solutions Llc.
(Telecom NMS Division)
IT-14/15 EPIP Sitapura Ind. Area,
Jaipur Rajasthan India 302017

Phone:
91-141- 5115907(Direct Office)
91-141-2770131,2,3 x123,124(Office EPABX)
91-141-3276997(Mobile)
91-141-2754337(Residence)
1-732-383-1223(USA VOIP number)

Fax
91-141-2770335

----- Original Message -----
From: "hari" <srihariprasad@xius.org>
To: "Streiber, Mario" <mario.streiber@hp.com>
Cc: <cxx-dev@cxx.cup.hp.com>; <hpux-devtools@cxx.cup.hp.com>
Sent: Wednesday, October 27, 2004 6:35 PM
Subject: Re: CXX-DEV: aCC query:Problem using SO_RCVTIMEO in setsockopt


> Hi Mario,
> We tried using select() but it is expensive in the sense, taking lot of
> CPU. Is there
> any option like SO_REVTIMEO for recv timeout ??
>
> Best Regards,
> Hari.
>
> Streiber, Mario wrote:
>
>     Is there any timeout option for socket "recv(..)" available
>     in HP-UX 11.0?
>     We have tried using setsockopt(..,..,SO_RCVTIMEO,..) . It
>     compiled fine
>     but recv isn't timing out. It is actually defined in
>     /usr/include/sys/socket.h.
>     We tried using socket() but it is expensive and taking lot of CPU. Our
>     application is multi threaded with 100 threads where main
>     thread listens
>     and child threads recv's the requests from clients.
>
>   There are two standard calls for this: select(2) and poll(2).
>
>   Mario
>    _________________________________________________________________
>    To leave this mailing list, send mail to   majordomo@cxx.cup.hp.com
with the message UNSUBSCRIBE cxx-dev
>    _________________________________________________________________
>
> --
> you must be the change you wish to see in the world
>  _________________________________________________________________
>  To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
>     with the message UNSUBSCRIBE cxx-dev
>  _________________________________________________________________
>
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE cxx-dev
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic