Date: Fri, 21 Feb 1997 08:22:21 +1100 From: David Nugent <davidn@labs.usn.blaze.net.au> To: Darren Reed <avalon@coombs.anu.edu.au> Cc: gurney_j@resnet.uoregon.edu, freebsd-hackers@freebsd.org Subject: Re: "connection refused" Message-ID: <19970221082221.50024@usn.blaze.net.au> In-Reply-To: <199702202046.HAA03159@unique.usn.blaze.net.au>; from Darren Reed on Feb 02, 1997 at 07:46:13AM References: <Pine.BSF.3.95q.970220114101.348E-100000@hydrogen.nike.efn.org> <199702202046.HAA03159@unique.usn.blaze.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 02, 1997 at 07:46:13AM, Darren Reed wrote: > In some mail from John-Mark Gurney, sie said: > > > Ok. Then recvmsg() should be used without (instead of) accept()? > > > > it seems that accept() does do what you want..... directly from the > > accept() man page: > > For certain protocols which require an explicit confirmation, such as ISO > > or DATAKIT, accept() can be thought of as merely dequeueing the next con- > > nection request and not implying confirmation. Confirmation can be im- > > plied by a normal read or write on the new file descriptor, and rejection > > can be implied by closing the new socket. Yes, that's how I read it too, the first time. :) > > it seems you can accept() a conntection... verify were it is coming from > > and then close and it will be rejected... as it turns out this isn't > > true... (I just wrote a test program to test it)... As did I, and hence my question. > What about if the socket accept() is using is non-blocking ? FWIW, the behaviour is the same and results in "connection closed by remote host" rather than "connection refused" as I would have expected. Regards, David Nugent - Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet davidn@freebsd.org davidn@blaze.net.au http://www.blaze.net.au/~davidn/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970221082221.50024>