From 33932b95e4b886aec8ac1bf3e3e1665826bcd0ea Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 29 May 2019 12:48:05 +0100 Subject: Add irc::sockets::isunix for checking if a file is a UNIX socket. --- include/socket.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/socket.h b/include/socket.h index e527bc7f5..6ecb23020 100644 --- a/include/socket.h +++ b/include/socket.h @@ -127,6 +127,12 @@ namespace irc * @return True if the conversion was successful; otherwise, false. */ CoreExport bool untosa(const std::string& path, irc::sockets::sockaddrs& sa); + + /** Determines whether the specified file is a UNIX socket. + * @param file The path to the file to check. + * @return True if the file is a UNIX socket; otherwise, false. + */ + CoreExport bool isunix(const std::string& file); } } -- cgit v1.3.1-10-gc9f91