Subject: Re: Should connect() be able to to be called again after ECONNREFUSED?
To: None <tech-net@netbsd.org>
From: Matthias Scheler <tron@zhadum.de>
List: tech-net
Date: 06/17/2003 21:10:05
In article <20030617203528.GA117342255@qnx.com>,
	Sean Boudreau <seanb@qnx.com> writes:
> Should one be able to call connect() again on a tcp socket after a
> failed attempt.

I don't think so.

> FWIW, I'm told Linux allows this (haven't confirmed).

*BSD is the reference for socket behaviour, not Linux.

> Here's a diff on a quick fix that allows this.

The fix doesn't behave as expected. If the socket e.g. was manually bound
before calling connect(2) it will not be bound to that address during
before the second connect(2) call.

	Kind regards

-- 
Matthias Scheler                                  http://scheler.de/~matthias/