|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
|
nodiscard |
Check that a Unix socket path can be bound, removing a stale socket file.
Refuses a path that is too long, whose directory is missing or writable by others, or that holds something other than a socket. A socket file that is_alive says answers is refused as in use. One that does not is removed. Nothing is created, and bind can still fail, since another process may take the path first.
| source | The request. |
| is_alive | Called with an existing socket's path, returns true if a server answers on it. |
Definition at line 228 of file UnixSocket.hpp.
References MayaFlux::Platform::detail::entry_is_socket(), MayaFlux::Platform::AcquireFailure::InUse, MayaFlux::Platform::detail::make_failure(), MayaFlux::Platform::AcquireFailure::Missing, MayaFlux::Platform::AcquireFailure::NotDirectory, MayaFlux::Platform::AcquireFailure::NotSocket, MayaFlux::Platform::detail::path_exists(), MayaFlux::Platform::detail::path_is_directory(), MayaFlux::Platform::detail::resolve_socket_path(), MayaFlux::Platform::detail::socket_directory_is_safe(), MayaFlux::Platform::AcquireFailure::StaleNotRemoved, MayaFlux::Platform::AcquireFailure::TooLong, unix_socket_path_limit, and MayaFlux::Platform::AcquireFailure::Unsafe.
Referenced by MayaFlux::Core::UdsTransport::bind().