Deleted Added
full compact
5.t (1639) 5.t (18715)
1.\" Copyright (c) 1986, 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.\" @(#)5.t 8.1 (Berkeley) 8/14/93
1.\" Copyright (c) 1986, 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.\" @(#)5.t 8.1 (Berkeley) 8/14/93
33.\" $Id$
33.\"
34.\".ds RH "Advanced Topics
35.bp
36.nr H1 5
37.nr H2 0
38.LG
39.B
40.ce

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

1533Servers making use of \fIinetd\fP are considerably simplified,
1534as \fIinetd\fP takes care of the majority of the IPC work
1535required in establishing a connection. The server invoked
1536by \fIinetd\fP expects the socket connected to its client
1537on file descriptors 0 and 1, and may immediately perform
1538any operations such as \fIread\fP, \fIwrite\fP, \fIsend\fP,
1539or \fIrecv\fP. Indeed, servers may use
1540buffered I/O as provided by the ``stdio'' conventions, as
34.\"
35.\".ds RH "Advanced Topics
36.bp
37.nr H1 5
38.nr H2 0
39.LG
40.B
41.ce

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

1534Servers making use of \fIinetd\fP are considerably simplified,
1535as \fIinetd\fP takes care of the majority of the IPC work
1536required in establishing a connection. The server invoked
1537by \fIinetd\fP expects the socket connected to its client
1538on file descriptors 0 and 1, and may immediately perform
1539any operations such as \fIread\fP, \fIwrite\fP, \fIsend\fP,
1540or \fIrecv\fP. Indeed, servers may use
1541buffered I/O as provided by the ``stdio'' conventions, as
1541long as as they remember to use \fIfflush\fP when appropriate.
1542long as they remember to use \fIfflush\fP when appropriate.
1542.PP
1543One call which may be of interest to individuals writing
1544servers under \fIinetd\fP is the \fIgetpeername\fP call,
1545which returns the address of the peer (process) connected
1546on the other end of the socket. For example, to log the
1547Internet address in ``dot notation'' (e.g., ``128.32.0.4'')
1548of a client connected to a server under
1549\fIinetd\fP, the following code might be used:

--- 118 unchanged lines hidden ---
1543.PP
1544One call which may be of interest to individuals writing
1545servers under \fIinetd\fP is the \fIgetpeername\fP call,
1546which returns the address of the peer (process) connected
1547on the other end of the socket. For example, to log the
1548Internet address in ``dot notation'' (e.g., ``128.32.0.4'')
1549of a client connected to a server under
1550\fIinetd\fP, the following code might be used:

--- 118 unchanged lines hidden ---