This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

setting socket option SO_RCVTIMEO doesn't affect blocking behavior of recvfrom


Hi List,

I'm trying to develop a UDP client application which needs to send a request
wait for 10 seconds and if a response isn't received send another request.
Wanting to keep things as simple as possible I thought of using setsockopt
to force a 10 second timeout on the blocking call to recvfrom.  The level
used was SOL_SOCKET and the option was SO_RECVTIMEO with the time struct
loaded with a 10 for the seconds member.  The behavior of the application
appears unchanged by the call to setsockopt.

I'm thinking there's something I haven't done.  The application compiles and
links just fine.  Searching the archives for SO_RCVTIMEO gave results about
older versions of cygwin that didn't allow applications using it to compile.
I looked for libnsl.a to link against and didn't find it, however the fact
that the application compiled, linked, loaded, and ran(just without the
behavior I wanted) seems to imply that the correct libraries were included
implicitly?

Any help will be appreciated.

--
Opinions expressed in this email are the sole property of the originator and
do not necessarily reflect the position of The Boeing Company(tm) or its
affiliates.  The Boeing Company(tm) assumes no liability for damages
resulting from the use of this communication; and makes no claim, real or
implied, regarding the fitness for use of this communication.

Frank Lane
frank.l.lane@boeing.com
256.461.2270



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]