WebCFace 2.9.0
Web-based Communication Framework & Dashboard-like UI
Loading...
Searching...
No Matches
unix_path.h
Go to the documentation of this file.
1#pragma once
2#ifdef WEBCFACE_MESON
3#include "webcface-config.h"
4#else
5#include "webcface/common/webcface-config.h"
6#endif
7#ifdef WEBCFACE_COMPILER_IS_GCC
8#pragma GCC diagnostic push
9#pragma GCC diagnostic ignored "-Wabi"
10#endif
11#include <spdlog/logger.h>
12#ifdef WEBCFACE_COMPILER_IS_GCC
13#pragma GCC diagnostic pop
14#endif
15
16#if WEBCFACE_EXP_FILESYSTEM
17#include <experimental/filesystem>
18namespace std_fs = std::experimental::filesystem;
19#else
20#include <filesystem>
21namespace std_fs = std::filesystem;
22#endif
23
25namespace internal {
26
31std_fs::path unixSocketPath(int port);
36std_fs::path unixSocketPathWSLInterop(int port);
41bool detectWSL1();
46bool detectWSL2();
51std::string wsl2Host();
52
57void initUnixSocket(const std_fs::path &path,
58 const std::shared_ptr<spdlog::logger> &logger);
63void updateUnixSocketPerms(const std_fs::path &path,
64 const std::shared_ptr<spdlog::logger> &logger);
65
66} // namespace internal
void initUnixSocket(const std_fs::path &path, const std::shared_ptr< spdlog::logger > &logger)
socketファイルがすでにあれば削除する
Definition unix_path.cc:65
std_fs::path unixSocketPath(int port)
unix socket のパス
Definition unix_path.cc:13
bool detectWSL2()
wsl2ならtrue
Definition unix_path.cc:33
bool detectWSL1()
wsl1ならtrue
Definition unix_path.cc:28
std::string wsl2Host()
wslから見たwindowsのipアドレス
Definition unix_path.cc:37
std_fs::path unixSocketPathWSLInterop(int port)
wslから見たwindows側で開いている unix socket のパス
Definition unix_path.cc:24
void updateUnixSocketPerms(const std_fs::path &path, const std::shared_ptr< spdlog::logger > &logger)
socketファイルのパーミッション設定
Definition unix_path.cc:94
#define WEBCFACE_NS_END
Definition webcface-config.h:118
#define WEBCFACE_NS_BEGIN
Definition webcface-config.h:117