linux-mips
[Top] [All Lists]

Re: Socket problem?

To: linux-mips@linux-mips.org
Subject: Re: Socket problem?
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Date: Mon, 24 May 2004 11:13:35 +0200
In-reply-to: <000501c44168$b4718800$2000a8c0@gillpc>
Mail-followup-to: linux-mips@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20040522160635.GV1912@lug-owl.de> <000501c44168$b4718800$2000a8c0@gillpc>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.5.1+cvs20040105i
On Mon, 2004-05-24 09:25:43 +0100, Gill <gill.robles@exterity.co.uk>
wrote in message <000501c44168$b4718800$2000a8c0@gillpc>:
> Hi -
> 
> To clarify, more specifically select() returns a positive value, and a
> subsequent call to FD_ISSET() returns TRUE for one of the sockets the app is
> listening on.  Then, app calls recvfrom() which returns (sometimes) -1.
> Problem occurs sporadically...I'm seeing it every hundred or so packets at
> the moment, but it varies.

That sounds perfectly okay.

>From SuS V3:
-------------------------------------------------------------------
A descriptor shall be considered ready for reading when a call to an
input function with O_NONBLOCK clear would not block, whether or not the
function would transfer data successfully. (The function might return
data, an end-of-file indication, or an error other than one indicating
that it is blocked, and in each of these cases the descriptor shall be
considered ready for reading.)
-------------------------------------------------------------------

So everything is perfectly okay, and because you have to do proper error
checking anyways, that shouldn't disturb your application at all.

MfG, JBG

-- 
   Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>