1#ifndef UVW_PIPE_INCLUDE_H
2#define UVW_PIPE_INCLUDE_H
19enum class uvw_chmod_flags : std::underlying_type_t<uv_poll_event> {
20 READABLE = UV_READABLE,
21 WRITABLE = UV_WRITABLE,
40 using chmod_flags = details::uvw_chmod_flags;
42 explicit pipe_handle(loop::token token, std::shared_ptr<loop> ref,
bool pass =
false);
70 int bind(
const std::string &name,
const bool no_truncate =
false);
83 int connect(
const std::string &name,
const bool no_truncate =
false);
90 std::string
sock() const noexcept;
98 std::
string peer() const noexcept;
152 int chmod(chmod_flags flags) noexcept;
int open(file_handle file)
Opens an existing file descriptor or HANDLE as a pipe.
int init()
Initializes the handle.
handle_type receive() noexcept
Used to receive handles over IPC pipes.
std::string peer() const noexcept
Gets the name of the Unix domain socket or the named pipe to which the handle is connected.
int connect(const std::string &name, const bool no_truncate=false)
Connects to the Unix domain socket or the named pipe.
std::string sock() const noexcept
Gets the name of the Unix domain socket or the named pipe.
int bind(const std::string &name, const bool no_truncate=false)
bind Binds the pipe to a file path (Unix) or a name (Windows).
void pending(int count) noexcept
Sets the number of pending pipe this instance can handle.
int chmod(chmod_flags flags) noexcept
Alters pipe permissions.
details::uvw_handle_type handle_type
details::uv_type_wrapper< uv_file > file_handle