Subject: Re: accept(2) and evanescent connections
To: Atsushi Onoe <onoe@sm.sony.co.jp>
From: Castor Fu <castor@geocast.com>
List: tech-net
Date: 07/27/2000 13:22:58
I should have said that there is sample code for this
in the mozilla tree:
http://bugzilla.mozilla.org/show_bug.cgi?id=43519
It's a unix domain socket. . .
-castor
> > 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 cannot figure out your problem. Since you use accept(2), it would be
> SOCK_STREAM. But I can get the correct sockaddr from accept(2) for
> PF_INET case. For PF_UNIX case, the client's sockname would be anonymous.