Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ listen(2) — DG/UX R4.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

accept(2)

connect(2)

socket(2)

inet(3N)

inet(6F)



listen(2)                         SDK R4.11                        listen(2)


NAME
       listen - listen for connections on a socket

SYNOPSIS
       int  listen (s, backlog)
       int  s;
       int  backlog;

   where:
       s         File descriptor of socket to listen on.

       backlog   Maximum number of waiting connections.

DESCRIPTION
       To accept connections, a socket is first created with socket(), a
       backlog for incoming connections is specified with listen(), and then
       the connections are accepted with accept().  The listen call applies
       only to sockets of type SOCK_STREAM.

       The backlog parameter defines the maximum length to which the queue
       of pending connections may grow.  If a connection request arrives
       with the queue full, the client will receive the error ECONNREFUSED.

       In the DG/UX system the backlog is currently limited to SOMAXCONN.
       If a backlog greater than SOMAXCONN is specified, the backlog will be
       set SOMAXCONN; however no error notification will be returned.
       SOMAXCONN is defined in <sys/socket.h>.

ACCESS CONTROL
       None.  (See domain-specific restrictions in related documentation.)

RETURN VALUE
       0      Completed successfully.

       -1     An error occurred.  errno is set to indicate the error.

DIAGNOSTICS
       Errno may be set to one of the following error codes:

       EBADF          The argument s is not an active valid descriptor.

       ENOTSOCK       The argument s is not a socket.

       EOPNOTSUPP     The socket is not of a type that supports the
                      operation listen.

       EINVAL         Invalid argument.

SEE ALSO
       accept(2), connect(2), socket(2), inet(3N), inet(6F), unixipc(6F).


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026