Back to libut API Reference


SYNOPSIS

    #include "libut/ut.h"
    int UT_net_listen_close(int fd);


DESCRIPTION

This function closes the listening TCP/IP socket whose file descriptor is fd. The listener must have previously established using UT_net_listen(3).


RETURN VALUE

On success, 0 is returned. If fd does not refer to a listening socket previously created using UT_net_listen(3), -1 is returned.


RELATED CONTROL PORT COMMANDS

The fds command displays listening as well as connected sockets.


SEE ALSO

UT_net_listen_close(3), UT_net_resolve(3)


AUTHOR

Troy D. Hanson <thanson@users.sourceforge.net>