www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2003/02/25/08:54:48

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
X-Authentication-Warning: atacama.four-d.de: mail set sender to <tpfaff AT gmx DOT net> using -f
Date: Tue, 25 Feb 2003 14:53:41 +0100 (=?ISO-8859-1?Q?Westeurop=E4ische_Normalzeit?=)
From: Thomas Pfaff <tpfaff AT gmx DOT net>
To: cygwin-developers AT cygwin DOT com
Subject: Re: Interruptable connect
In-Reply-To: <20030225121251.GF8853@cygbert.vinschen.de>
Message-ID: <Pine.WNT.4.44.0302251335100.349-100000@algeria.intern.net>
X-X-Sender: pfaff AT antarctica DOT intern DOT net
MIME-Version: 1.0


On Tue, 25 Feb 2003, Corinna Vinschen wrote:

> Hi Thomas,
>
> could we discuss this issue again?  Do we have any problem to get all
> required information on a socket which would keep us from closing it
> and reopen a new one in the same (but unconnected) state?
>

Corinna,

i think that it is possible to restore all required socket options.

Following socket options can be read by getsockopt and restored via
setsockopt:

SO_DEBUG
SO_REUSEADDR
SO_KEEPALIVE
SO_DONTROUTE
SO_BROADCAST
SO_LINGER
SO_OOBINLINE
SO_DONTLINGER
SO_SNDBUF
SO_RCVBUF
TCP_NODELAY

SO_ERROR seems to be difficult because setsockopt does not allow to set
it (and i don't know which error should be set after an interrupted
connect. Maybe you could check this on Linux).

All flags set by fcntl must be restored.

Following options seems to be unsupported by Winsock (and i suppose that
they are unsupported by cygwin too).

SO_USELOOPBACK
SO_SNDLOWAT
SO_RCVLOWAT
SO_SNDTIMEO
SO_RCVTIMEO


And of course if the socket is already bound the socket address must be
restored. This should be possible by using SO_REUSEADDR after the original
socket has been closed.

Thomas




- Raw text -


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