accept.2 (108028) | accept.2 (108087) |
---|---|
1.\" Copyright (c) 1983, 1990, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)accept.2 8.2 (Berkeley) 12/11/93 | 1.\" Copyright (c) 1983, 1990, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)accept.2 8.2 (Berkeley) 12/11/93 |
33.\" $FreeBSD: head/lib/libc/sys/accept.2 108028 2002-12-18 09:22:32Z ru $ | 33.\" $FreeBSD: head/lib/libc/sys/accept.2 108087 2002-12-19 09:40:28Z ru $ |
34.\" 35.Dd December 11, 1993 36.Dt ACCEPT 2 37.Os 38.Sh NAME 39.Nm accept 40.Nd accept a connection on a socket 41.Sh LIBRARY --- 32 unchanged lines hidden (view full) --- 74The accepted socket 75may not be used 76to accept more connections. The original socket 77.Fa s 78remains open. 79.Pp 80The argument 81.Fa addr | 34.\" 35.Dd December 11, 1993 36.Dt ACCEPT 2 37.Os 38.Sh NAME 39.Nm accept 40.Nd accept a connection on a socket 41.Sh LIBRARY --- 32 unchanged lines hidden (view full) --- 74The accepted socket 75may not be used 76to accept more connections. The original socket 77.Fa s 78remains open. 79.Pp 80The argument 81.Fa addr |
82is a result parameter that is filled-in with | 82is a result argument that is filled-in with |
83the address of the connecting entity, 84as known to the communications layer. 85The exact format of the 86.Fa addr | 83the address of the connecting entity, 84as known to the communications layer. 85The exact format of the 86.Fa addr |
87parameter is determined by the domain in which the communication | 87argument is determined by the domain in which the communication |
88is occurring. 89The 90.Fa addrlen | 88is occurring. 89The 90.Fa addrlen |
91is a value-result parameter; it should initially contain the | 91argument 92is a value-result argument; it should initially contain the |
92amount of space pointed to by 93.Fa addr ; 94on return it will contain the actual length (in bytes) of the 95address returned. 96This call 97is used with connection-based socket types, currently with 98.Dv SOCK_STREAM . 99.Pp --- 40 unchanged lines hidden (view full) --- 140.It Bq Er ENOTSOCK 141The descriptor references a file, not a socket. 142.It Bq Er EINVAL 143.Xr listen 2 144has not been called on the socket descriptor. 145.It Bq Er EFAULT 146The 147.Fa addr | 93amount of space pointed to by 94.Fa addr ; 95on return it will contain the actual length (in bytes) of the 96address returned. 97This call 98is used with connection-based socket types, currently with 99.Dv SOCK_STREAM . 100.Pp --- 40 unchanged lines hidden (view full) --- 141.It Bq Er ENOTSOCK 142The descriptor references a file, not a socket. 143.It Bq Er EINVAL 144.Xr listen 2 145has not been called on the socket descriptor. 146.It Bq Er EFAULT 147The 148.Fa addr |
148parameter is not in a writable part of the | 149argument is not in a writable part of the |
149user address space. 150.It Bq Er EWOULDBLOCK 151The socket is marked non-blocking and no connections 152are present to be accepted. 153.It Bq Er ECONNABORTED 154A connection arrived, but it was closed while waiting 155on the listen queue. 156.El --- 13 unchanged lines hidden --- | 150user address space. 151.It Bq Er EWOULDBLOCK 152The socket is marked non-blocking and no connections 153are present to be accepted. 154.It Bq Er ECONNABORTED 155A connection arrived, but it was closed while waiting 156on the listen queue. 157.El --- 13 unchanged lines hidden --- |