delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/15/10:41:37

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3B2480653E7D2C4E8AA5699598D691C429FF74@xch-se-03.se.nos.boeing.com>
From: "Lane, Frank L" <frank DOT l DOT lane AT boeing DOT com>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: setting socket option SO_RCVTIMEO doesn't affect blocking behavio
r of recvfrom
Date: Wed, 15 Jan 2003 09:40:55 -0600
MIME-Version: 1.0

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 DOT l DOT lane AT boeing DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019