delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/05/17/20:54:07

From: wfire AT pimpz DOT darkillustrated DOT org (Holister)
Subject: Re: Non blocking I/O
17 May 1997 20:54:07 -0700 :
Sender: mail AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <Pine.LNX.3.91.970517221828.963A-100000.cygnus.gnu-win32@mathe.ppp.cyberenet.net>
X-Sender: wfire AT mathe DOT ppp DOT cyberenet DOT net
Original-To: Mike Bernson <mike AT mbsun DOT mlb DOT org>
Original-cc: gnu-win32 AT cygnus DOT com
In-Reply-To: <337E1C01.1CFBAE39@mbsun.mlb.org>
MIME-Version: 1.0
Original-Sender: owner-gnu-win32 AT cygnus DOT com


On Sat, 17 May 1997, Mike Bernson wrote:

> I am trying to set the the non-block read or write for a 
> tcp-socket.
> 
> I do the following fcntl(fd, SETFL, O_NONBLOCK) which does not
> return any errors. Then a do a read on the fd and it blocks. 
> 
> I need a way to do none blocking reads or find out how much data
> is pending so I can do the read for just that amount of data.
> 
> The same would be nice for writes but not needed.

select() will tell you IF data is pending, which is good... fctl() 
doesn't work in linux for setting non_blocking on tcp sockets either...so 
don't feel bad :)
-
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