Document SO_ACCEPTCONN.

Submitted by:	Vlad GALU (with changes)
MFC after:	3 days
This commit is contained in:
Bruce M Simpson 2007-03-08 12:57:12 +00:00
parent f22bd00d94
commit 7b7b32179e

View File

@ -28,7 +28,7 @@
.\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95
.\" $FreeBSD$
.\"
.Dd January 11, 2007
.Dd March 8, 2007
.Dt GETSOCKOPT 2
.Os
.Sh NAME
@ -165,6 +165,7 @@ controls generation of
for the socket
.It Dv SO_TIMESTAMP Ta "enables reception of a timestamp with datagrams"
.It Dv SO_BINTIME Ta "enables reception of a timestamp with datagrams"
.It Dv SO_ACCEPTCONN Ta "get listening status of the socket (get only)"
.It Dv SO_TYPE Ta "get the type of the socket (get only)"
.It Dv SO_ERROR Ta "get and clear error on the socket (get only)"
.El
@ -408,11 +409,17 @@ and for
.Ed
.Pp
Finally,
.Dv SO_ACCEPTCONN ,
.Dv SO_TYPE
and
.Dv SO_ERROR
are options used only with
.Fn getsockopt .
.Dv SO_ACCEPTCONN
returns whether the socket is currently accepting connections,
i.e. whether or not the
.Xr listen 2
system call was invoked on the socket.
.Dv SO_TYPE
returns the type of the socket, such as
.Dv SOCK_STREAM ;
@ -453,6 +460,7 @@ on a non-listening socket was attempted.
.El
.Sh SEE ALSO
.Xr ioctl 2 ,
.Xr listen 2 ,
.Xr recvmsg 2 ,
.Xr socket 2 ,
.Xr getprotoent 3 ,