Subject: Re: accept(2) and evanescent connections
To: Castor Fu <castor@geocast.com>
From: None <itojun@iijlab.net>
List: tech-net
Date: 07/28/2000 02:06:12
>On NetBSD right now, if I have a socket which is listening for connections
>and someone sends me data and closes the connection, accept(2)
>will return success, and reads will give me the residual data,
>but the data in the sockaddr structure returned is garbage.
>I haven't sorted out if the info for the sockaddr structure could
>somehow be preserved.  In FreeBSD, the size of the sockaddr is set
>to zero.
>Any suggestions on what "The Right Thing" is?  If the data in the
>socket is still hanging around, it seems like we should preserve the 
>address info, too.  Otherwise, we should just return an error of some sort.

	could I ask what kind of socket you mean?  udp, tcp, raw ip?
	do you have sample code or tcpdump trace?

itojun