• Xavier Thompson's avatar
    promise/plugin: Add check_socket_listening promise · 428870e3
    Xavier Thompson authored
    This promise generalizes the check_port_listening promise to include
    AF_UNIX sockets in addition to AF_INET and AF_INET6 host/port sockets.
    
    The socket family and address is deduced from the set of arguments:
    - `host` & `port`: AF_INET or AF_INET6
    - `pathname`: filesystem pathname address for AF_UNIX
    - `abstract`: '\0' is prefixed to build an abstract AF_UNIX address
    
    All other combinations of arguments are forbidden.
    
    The promise creates a socket accordingly and attempts to connect to the
    provided address. The promise fails if the connection fails.
    
    The check_port_listening promise has been removed.
    
    See merge request !97
    428870e3
test_check_socket_listening.py 3.39 KB