Lines Matching full:socket

44 The basic building block for communication is the \fIsocket\fP.
45 A socket is an endpoint of communication to which a name may
46 be \fIbound\fP. Each socket in use has a \fItype\fP
55 socket may be named \*(lq/dev/foo\*(rq. Sockets normally
77 socket facilities available to a user. An example of the
78 latter is that a socket \*(lqoperating\*(rq in the UNIX domain
82 Socket types
94 A \fIstream\fP socket provides for the bidirectional, reliable,
104 A \fIdatagram\fP socket supports bidirectional flow of data which
107 receiving messages on a datagram socket may find messages duplicated,
111 socket is that record boundaries in data are preserved. Datagram
115 A \fIraw\fP socket provides users access to
117 protocols which support socket abstractions.
126 A \fIsequenced packet\fP socket is similar to a stream socket,
128 interface is provided only as part of the NS socket abstraction,
138 Another potential socket type which has interesting properties is
140 message\fP socket.
141 The reliably delivered message socket has
142 similar properties to a datagram socket, but with
144 type of socket, but a reliably delivered message protocol
149 Socket creation
151 To create a socket the \fIsocket\fP system call is used:
153 s = socket(domain, type, protocol);
155 This call requests that the system create a socket in the specified
160 may be used to support the requested socket type. The user is
163 one of the manifest constants defined in the file <\fIsys/socket.h\fP>.
170 The socket types are also defined in this file
173 To create a stream socket in the Internet domain the following
176 s = socket(AF_INET, SOCK_STREAM, 0);
178 This call would result in a stream socket being created with the TCP
180 create a datagram socket for on-machine use the call might
183 s = socket(AF_UNIX, SOCK_DGRAM, 0);
187 \fIsocket\fP call is 0) should be correct for most every
192 There are several reasons a socket call may fail. Aside from
193 the rare occurrence of lack of memory (ENOBUFS), a socket
195 (EPROTONOSUPPORT), or a request for a type of socket for
200 A socket is created without a name. Until a name is bound
201 to a socket, processes have no way to reference it and, consequently,
226 and \fIaccept\fP primitives are used to complete a socket's association.
231 address and port number to a socket, because the
234 unbound socket. The process of binding names to NS
251 the name \*(lq/tmp/foo\*(rq to a UNIX domain socket, the
272 referred to in \fIaddr.sun_path\fP is created as a socket
295 Binding an NS address to a socket is even more
315 binds a socket to a well-known address associated with the service
316 and then passively \*(lqlistens\*(rq on its socket.
320 \*(lqconnection\*(rq to the server's socket.
346 If the client process's socket is unbound at the time of
349 the socket if necessary; c.f. section 5.4.
351 to a socket.
355 Otherwise, the socket is associated with the server and
387 two steps after binding its socket.
411 With a socket marked as listening, a server may \fIaccept\fP
426 a new socket). If the server wishes to find out who its client is,
427 it may supply a buffer for the client socket's name. The value-result
440 wants to accept connections on more than one socket, or wants to avoid blocking
466 defined in \fI<sys/socket.h>\fP, may be
485 is, the next \fIread\fP or \fIrecv\fP call applied to the socket will
490 Once a socket is no longer of interest, it may be discarded
495 If data is associated with a socket which promises reliable delivery
496 (e.g. a stream socket) when a close takes place, the system will
501 perform a \fIshutdown\fP on the socket prior to closing it.
516 A datagram socket provides a symmetric interface to data
542 To receive messages on an unconnected datagram socket, the
554 a socket with a specific destination address. In this case, any
555 data sent on the socket will automatically be addressed
558 address is permitted for each socket at one time;
564 the peer's address (as compared to a stream socket, where a
569 While a datagram socket socket is connected,
573 on the socket,
574 or a special socket option used with \fIgetsockopt\fP, SO_ERROR,
604 exceptional condition currently implemented by the socket
655 on a socket to be used with an \fIaccept\fP call,
658 readiness on the appropriate socket. If \fIFD_ISSET\fP
660 connection is pending on the socket.
689 \fISocket #1 is ready to be read from.\fP
693 \fISocket #2 is ready to be read from.\fP