delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/08/08:49:14

From: grimm AT itd DOT nrl DOT navy DOT mil (Todd M. Grimm)
Subject: select()
8 Oct 1998 08:49:14 -0700 :
Message-ID: <Pine.SUN.3.91.981007122657.4416E-100000.cygnus.gnu-win32@grout>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

I am using select() to test whether there are bytes on a socket to read 
without blocking my program to check on this.

The problem is that even when there is no data it returns a 1 to say that 
there is data. This causes my program to try a read which blocks because 
there really is no data.

I saw several messages in the archives of this list about this, but all I 
could find were questions. No one ever seemed to answer the question.

Please let me know if you know how to get select() to work right or if 
there is a nother way to test for bytes without blocking.

Thanks,
Todd grimm

-------------------------------------------------------------------------------
Todd M. Grimm, 202-767-5780, grimm AT itd DOT nrl DOT navy DOT mil
ITT Systems & Sciences Corp. at the Naval Research Laboratory, Washington, D.C.
-------------------------------------------------------------------------------

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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