diff options
author | 2000-10-18 05:12:06 +0000 | |
---|---|---|
committer | 2000-10-18 05:12:06 +0000 | |
commit | ea418ffe85da8239e30bb1c3e28466cf6b8f685e (patch) | |
tree | 01651b197bba18ec88ec6a378fec58207d2f3632 /lib/libc/sys/socket.2 | |
parent | get the bounds checking right for the data used in copyout() in several (diff) | |
download | wireguard-openbsd-ea418ffe85da8239e30bb1c3e28466cf6b8f685e.tar.xz wireguard-openbsd-ea418ffe85da8239e30bb1c3e28466cf6b8f685e.zip |
Another round of man page cleanup, this time to remove more hard sentence
breaks and getting rid of short lines, making these files easier to work with.
Diffstat (limited to 'lib/libc/sys/socket.2')
-rw-r--r-- | lib/libc/sys/socket.2 | 68 |
1 files changed, 32 insertions, 36 deletions
diff --git a/lib/libc/sys/socket.2 b/lib/libc/sys/socket.2 index c69415a8018..1439d243820 100644 --- a/lib/libc/sys/socket.2 +++ b/lib/libc/sys/socket.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: socket.2,v 1.17 2000/05/24 15:19:28 itojun Exp $ +.\" $OpenBSD: socket.2,v 1.18 2000/10/18 05:12:12 aaron Exp $ .\" $NetBSD: socket.2,v 1.5 1995/02/27 12:37:53 cgd Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -70,8 +70,8 @@ AF_IMPLINK (IMP \*(lqhost at IMP\*(rq link layer). .Pp The socket has the indicated .Fa type , -which specifies the semantics of communication. Currently -defined types are: +which specifies the semantics of communication. +Currently defined types are: .Pp .Bd -literal -offset indent -compact SOCK_STREAM @@ -113,11 +113,11 @@ The .Fa protocol specifies a particular protocol to be used with the socket. Normally only a single protocol exists to support a particular -socket type within a given protocol family. However, it is possible -that many protocols may exist, in which case a particular protocol -must be specified in this manner. The protocol number to use is -particular to the \*(lqcommunication domain\*(rq in which communication -is to take place; see +socket type within a given protocol family. +However, it is possible that many protocols may exist, +in which case a particular protocol must be specified in this manner. +The protocol number to use is particular to the \*(lqcommunication domain\*(rq +in which communication is to take place; see .Xr protocols 5 . A value of 0 for .Fa protocol @@ -126,13 +126,14 @@ socket type. .Pp Sockets of type .Dv SOCK_STREAM -are full-duplex byte streams, similar -to pipes. A stream socket must be in a +are full-duplex byte streams, similar to pipes. +A stream socket must be in a .Em connected -state before any data may be sent or received -on it. A connection to another socket is created with a +state before any data may be sent or received on it. +A connection to another socket is created with a .Xr connect 2 -call. Once connected, data may be transferred using +call. +Once connected, data may be transferred using .Xr read 2 and .Xr write 2 @@ -140,7 +141,8 @@ calls or some variant of the .Xr send 2 and .Xr recv 2 -calls. When a session has been completed a +calls. +When a session has been completed a .Xr close 2 may be performed. Out-of-band data may also be transmitted as described in @@ -150,35 +152,30 @@ and received as described in .Pp The communications protocols used to implement a .Dv SOCK_STREAM -insure that data -is not lost or duplicated. If a piece of data for which the -peer protocol has buffer space cannot be successfully transmitted -within a reasonable length of time, then -the connection is considered broken and calls -will indicate an error with -\-1 returns and with +ensure that data is not lost or duplicated. +If a piece of data for which the peer protocol has buffer space cannot +be successfully transmitted within a reasonable length of time, then the +connection is considered broken and calls will indicate an error with \-1 +returns and with .Er ETIMEDOUT as the specific code in the global variable .Va errno . The protocols optionally keep sockets .Dq warm -by forcing transmissions -roughly every minute in the absence of other activity. -An error is then indicated if no response can be -elicited on an otherwise +by forcing transmissions roughly every minute in the absence of other activity. +An error is then indicated if no response can be elicited on an otherwise idle connection for a extended period (e.g., 5 minutes). A .Dv SIGPIPE -signal is raised if a process sends -on a broken stream; this causes naive processes, -which do not handle the signal, to exit. +signal is raised if a process sends on a broken stream; this causes +naive processes, which do not handle the signal, to exit. .Pp .Dv SOCK_SEQPACKET sockets employ the same system calls as .Dv SOCK_STREAM -sockets. The only difference -is that +sockets. +The only difference is that .Xr read 2 calls will return only the amount of data requested, and any remaining in the arriving packet will be discarded. @@ -186,10 +183,10 @@ and any remaining in the arriving packet will be discarded. .Dv SOCK_DGRAM and .Dv SOCK_RAW -sockets allow sending of datagrams to correspondents -named in +sockets allow sending of datagrams to correspondents named in .Xr send 2 -calls. Datagrams are generally received with +calls. +Datagrams are generally received with .Xr recvfrom 2 , which returns the next datagram with its return address. .Pp @@ -199,9 +196,8 @@ call can be used to specify a process group to receive a .Dv SIGURG signal when the out-of-band data arrives. -It may also enable non-blocking I/O -and asynchronous notification of I/O events -via +It may also enable non-blocking I/O and asynchronous notification +of I/O events via .Dv SIGIO . .Pp The operation of sockets is controlled by socket level |