Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Mon, 10 Sep 2001 19:55:49 +0400 From: egor duda X-Mailer: The Bat! (v1.53 RC/4) Reply-To: egor duda Organization: deo X-Priority: 3 (Normal) Message-ID: <9436244126.20010910195549@logos-m.ru> To: Omid Roshan-Afshar CC: cygwin AT cygwin DOT com Subject: Re: recv() blocking for non-blocking socket In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! Monday, 10 September, 2001 Omid Roshan-Afshar omid AT acorn-networks DOT com wrote: ORA> I've looked through the archive, and I found ORA> some discussion about using accept() on non-blocking ORA> sockets, but none on recv(). If someone could spot ORA> any stupid errors in the following code, that would ORA> be great. ORA> { ORA> int true = 1; ORA> if (ioctl(sock_handle, FIONBIO, &true) != 0) { ORA> if (errmsg!=NULL) ORA> sprintf(errmsg, "ioctl(): %s", strerror(errno)); ORA> return GFAPI_ERR_FAIL; ORA> } ORA> } ORA> I call recv after I do this and it blocks. I *think* I'm ORA> doing the appropriate thing to make the socket non-blocking. can you provide a small self-contained testcase? it's impossible to conclude from your code snippet what kind of socket you are using, how exactly recv() is called, etc. Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19 -- 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/