delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/10/25/09:07:40

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
X-IAI-Env-From: <missura AT cs DOT uni-bonn DOT de> : [131.220.8.20]
Message-ID: <52376.131.220.7.1.1193317614.squirrel@webmail.iai.uni-bonn.de>
Date: Thu, 25 Oct 2007 15:06:54 +0200 (MEST)
Subject: Re: strange select() and recvfrom() behaviour
From: "Marcell Missura" <missura AT cs DOT uni-bonn DOT de>
To: cygwin AT cygwin DOT com
User-Agent: SquirrelMail/1.4.5
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

> Maybe you were also a little quick with your code. You don't really
> test what's going on, so your code is going crazy.

It demonstrates the difference in the behaviour of this select(),
recvfrom(), send() construct under linux and windows fairly well doesn't
it. I apologize if my unsophisticated skills are causing you extra trouble
and work, but I hope you don't mind me pointing at this issue and wonder
where it's coming from.


> recvfrom() returns with -1 and errno (which you never
> test) set to ECONNRESET.

Just to add my humble two cents, I find the behaviour on linux more
intuitive, because there is no connection when you use UDP so I don't see
what connection could have been reset. I also find it weird that after an
error occured select() returns and tells you that the socket has something
to _read_. After reading the documentation I thought this is what the
error fd_set was there for.

Marcell


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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