Query: listen
OS: hpux
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
listen(2) System Calls Manual listen(2)NAMElisten - listen for connections on a socketSYNOPSISDESCRIPTIONTo accept connections, a socket is first created using a queue for incoming connections is activated using and then connections are accepted using applies only to unconnected sockets of type SOCK_STREAM. Except for AF_VME_LINK, if the socket has not been bound to a local port before is invoked, the system automatically binds a local port for the socket to listen on (see inet(7F)). For sockets in the address family AF_CCITT and AF_VME_LINK, the socket be bound to an address by using before connection establishment can continue, otherwise an error is returned. A listen queue is established for the socket specified by the s parameter, which is a socket descriptor. backlog defines the desirable queue length for pending connections. The actual queue length may be greater than the specified backlog. If a connection request arrives when the queue is full, the client will receive an error. backlog is limited to the range of 0 to which is defined in is currently set to 4096. If any other value is specified, the system automat- ically assigns the closest value within the range. Note that for a backlog of 0 specifies only 1 pending connection is allowed at any given time. For a backlog of 0 specifies no further connection is allowed. X/Open Sockets Compilation Environment See xopen_networking(7).DEPENDENCIESAF_CCITT Call-acceptance can be controlled by the call described in Upon successful completion, returns 0; otherwise, it returns -1 and sets to indicate the error.ERRORSfails if any of the following conditions are encountered: s is not a valid file descriptor. The socket s has not been bound to an address by using s is a valid file descriptor but it is not a socket. The socket referenced by s does not support The socket has been shut down or is already connected.WARNINGSLinking binary objects compiled to specification and binary objects compiled to specification to the same executable may result in unex- pected behavior, including application abnormal termination and unexpected socket errors. See xopen_networking(7) for details and remedy.FUTURE DIRECTIONCurrently, the default behavior is the however, it might be changed to in a future release. At that time, any behavior that is incompati- ble with might be obsoleted. Applications that conform to the X/Open specification now will avoid migration problems (see xopen_network- ing(7)).AUTHORwas developed by HP and the University of California, Berkeley.SEE ALSOaccept(2), connect(2), socket(2), thread_safety(5), xopen_networking(7), inet(7F).STANDARDS CONFORMANCElisten(2)
Related Man Pages |
---|
listen(2) - redhat |
accept(2) - hpux |
getsockname(2) - hpux |
socketpair(2) - hpux |
listen(3xnet) - sunos |
Similar Topics in the Unix Linux Community |
---|
Cloning a socket connection, using other port numbers |
Problem with socket binding - "system" call |