*** doc/socket.n 1998/07/20 17:27:45 1.1 --- doc/socket.n 1998/07/20 18:27:15 *************** *** 23,30 **** This command opens a network socket and returns a channel identifier that may be used in future invocations of commands like \fBread\fR, \fBputs\fR and \fBflush\fR. ! At present only the TCP network protocol is supported; future ! releases may include support for additional protocols. The \fBsocket\fR command may be used to open either the client or server side of a connection, depending on whether the \fB\-server\fR switch is specified. --- 23,30 ---- This command opens a network socket and returns a channel identifier that may be used in future invocations of commands like \fBread\fR, \fBputs\fR and \fBflush\fR. ! At present only the TCP network and UNIX-domain protocols are supported; ! future releases may include support for additional protocols. The \fBsocket\fR command may be used to open either the client or server side of a connection, depending on whether the \fB\-server\fR switch is specified. *************** *** 66,71 **** --- 66,78 ---- socket is in nonblocking mode and a \fBgets\fR or \fBflush\fR is done on the socket before the connection attempt succeeds or fails, the operation returns immediately and \fBfblocked\fR on the socket returns 1. + .TP + \fB\-local\fR + The \fB\-local\fR option will cause the client socket to be connected + to a unix-domain socket. + The \fIport\fR argument is the pathname to the unix-domain socket. + The \fIhost\fR argument is ignored (it must exist but it can be just + an empty string). .SH "SERVER SOCKETS" .PP *************** *** 87,92 **** --- 94,104 ---- interfaces. If the option is omitted then the server socket is bound to the special address INADDR_ANY so that it can accept connections from any interface. + .TP + \fB\-local\fI pathname\fR + Using this option establishes a server with a unix-domain socket. + \fIPathname\fR gives the location of the unix-domain socket to be + used to connect to this server. .PP Server channels cannot be used for input or output; their sole use is to accept new client connections. The channels created for each incoming *************** *** 109,114 **** --- 121,128 ---- and the port number for the socket. If the host name cannot be computed, the second element is identical to the address, the first element of the list. + If this option is used for a channel associated with a unix-domain + socket, then the socket's pathname is returned. .TP \fB\-peername\fR This option is not supported by server sockets. For client and accepted *************** *** 116,121 **** --- 130,137 ---- address, the host name and the port to which the peer socket is connected or bound. If the host name cannot be computed, the second element of the list is identical to the address, its first element. + If this option is used for a channel associated with a unix-domain + socket, then the socket's pathname is returned. .PP .SH "SEE ALSO"