Deleted Added
full compact
sendfile.2 (108028) sendfile.2 (108087)
1.\" Copyright (c) 1998, David Greenman
2.\" 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 unmodified, this list of conditions, and the following

--- 9 unchanged lines hidden (view full) ---

18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
1.\" Copyright (c) 1998, David Greenman
2.\" 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 unmodified, this list of conditions, and the following

--- 9 unchanged lines hidden (view full) ---

18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD: head/lib/libc/sys/sendfile.2 108028 2002-12-18 09:22:32Z ru $
26.\" $FreeBSD: head/lib/libc/sys/sendfile.2 108087 2002-12-19 09:40:28Z ru $
27.\"
28.Dd November 5, 1998
29.Dt SENDFILE 2
30.Os
31.Sh NAME
32.Nm sendfile
33.Nd send a file to a socket
34.Sh LIBRARY

--- 71 unchanged lines hidden (view full) ---

106implementation of
107.Fn sendfile
108is "zero-copy", meaning that it has been optimized so that copying of the file data is avoided.
109.Sh RETURN VALUES
110.Rv -std sendfile
111.Sh ERRORS
112.Bl -tag -width Er
113.It Bq Er EBADF
27.\"
28.Dd November 5, 1998
29.Dt SENDFILE 2
30.Os
31.Sh NAME
32.Nm sendfile
33.Nd send a file to a socket
34.Sh LIBRARY

--- 71 unchanged lines hidden (view full) ---

106implementation of
107.Fn sendfile
108is "zero-copy", meaning that it has been optimized so that copying of the file data is avoided.
109.Sh RETURN VALUES
110.Rv -std sendfile
111.Sh ERRORS
112.Bl -tag -width Er
113.It Bq Er EBADF
114The
114.Fa fd
115.Fa fd
116argument
115is not a valid file descriptor.
116.It Bq Er EBADF
117is not a valid file descriptor.
118.It Bq Er EBADF
119The
117.Fa s
120.Fa s
121argument
118is not a valid socket descriptor.
119.It Bq Er ENOTSOCK
122is not a valid socket descriptor.
123.It Bq Er ENOTSOCK
124The
120.Fa s
125.Fa s
126argument
121is not a socket.
122.It Bq Er EINVAL
127is not a socket.
128.It Bq Er EINVAL
129The
123.Fa fd
130.Fa fd
131argument
124is not a regular file.
125.It Bq Er EINVAL
132is not a regular file.
133.It Bq Er EINVAL
134The
126.Fa s
135.Fa s
136argument
127is not a SOCK_STREAM type socket.
128.It Bq Er EINVAL
137is not a SOCK_STREAM type socket.
138.It Bq Er EINVAL
139The
129.Fa offset
140.Fa offset
141argument
130is negative or out of range.
131.It Bq Er ENOTCONN
142is negative or out of range.
143.It Bq Er ENOTCONN
144The
132.Fa s
145.Fa s
146argument
133points to an unconnected socket.
134.It Bq Er EPIPE
135The socket peer has closed the connection.
136.It Bq Er EIO
137An error occurred while reading from
138.Fa fd .
139.It Bq Er EFAULT
147points to an unconnected socket.
148.It Bq Er EPIPE
149The socket peer has closed the connection.
150.It Bq Er EIO
151An error occurred while reading from
152.Fa fd .
153.It Bq Er EFAULT
140An invalid address was specified for a parameter.
154An invalid address was specified for an argument.
141.It Bq Er EAGAIN
142The socket is marked for non-blocking I/O and not all data was sent due to the socket buffer being filled.
143If specified, the number of bytes successfully sent will be returned in
144.Fa *sbytes .
145.El
146.Sh SEE ALSO
147.Xr open 2 ,
148.Xr send 2 ,

--- 16 unchanged lines hidden ---
155.It Bq Er EAGAIN
156The socket is marked for non-blocking I/O and not all data was sent due to the socket buffer being filled.
157If specified, the number of bytes successfully sent will be returned in
158.Fa *sbytes .
159.El
160.Sh SEE ALSO
161.Xr open 2 ,
162.Xr send 2 ,

--- 16 unchanged lines hidden ---