1. ssssoooocccckkkkeeeetttt____lllliiiisssstttteeeennnn((((3333)))) MMMMuuuuddddOOOOSSSS ((((5555 SSSSeeeepppp 1111999999994444)))) ssssoooocccckkkkeeeetttt____lllliiiisssstttteeeennnn((((3333))))
    2. NNNNAAAAMMMMEEEE
    3. socket_listen() - listen for connections on a socket
    4. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
    5. #include <socket_err.h>
    6. int socket_listen( int s, string listen_callback );
    7. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
    8. To accept connections, a socket is first created with
    9. socket_create(3), the socket is them put into listening mode
    10. with socket_listen(3), and the connections are accepted with
    11. socket_accept(3). The socket_listen() call applies only to
    12. sockets of type STREAM or MUD.
    13. The argument listen_callback is the name of a function for
    14. the driver to call when a connection is requested on the
    15. listening socket. The listen callback should follow this
    16. format:
    17. void listen_callback(int fd)
    18. Where fd is the listening socket.
    19. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS
    20. socket_listen() returns:
    21. EESUCCESS on success.
    22. a negative value indicated below on error.
    23. EEEERRRRRRRROOOORRRRSSSS
    24. EEFDRANGE Descriptor out of range.
    25. EEBADF Descriptor is invalid.
    26. EESECURITY Security violation attempted.
    27. EEMODENOTSUPP Socket mode not supported.
    28. EENOADDR Socket not bound to an address.
    29. EEISCONN Socket is already connected.
    30. EELISTEN Problem with listen.
    31. SSSSEEEEEEEE AAAALLLLSSSSOOOO
    32. Page 1 (Writen 5/23/97)
    33. ssssoooocccckkkkeeeetttt____lllliiiisssstttteeeennnn((((3333)))) MMMMuuuuddddOOOOSSSS ((((5555 SSSSeeeepppp 1111999999994444)))) ssssoooocccckkkkeeeetttt____lllliiiisssstttteeeennnn((((3333))))
    34. socket_accept(3), socket_connect(3), socket_create(3)
    35. Page 2 (Writen 5/23/97)