1#ifndef UVW_PIPE_INCLUDE_H
2#define UVW_PIPE_INCLUDE_H
17enum class UVChmodFlags : std::underlying_type_t<uv_poll_event> {
18 READABLE = UV_READABLE,
19 WRITABLE = UV_WRITABLE
35class PipeHandle final:
public StreamHandle<PipeHandle, uv_pipe_t> {
37 using Chmod = details::UVChmodFlags;
39 explicit PipeHandle(ConstructorAccess ca, std::shared_ptr<Loop> ref,
bool pass =
false);
66 void bind(
const std::string &name);
85 std::string
sock() const noexcept;
93 std::
string peer() const noexcept;
Utility class to handle flags.
bool chmod(Flags< Chmod > flags) noexcept
Alters pipe permissions.
void open(FileHandle file)
Opens an existing file descriptor or HANDLE as a pipe.
bool init()
Initializes the handle.
std::string sock() const noexcept
Gets the name of the Unix domain socket or the named pipe.
HandleType receive() noexcept
Used to receive handles over IPC pipes.
void connect(const std::string &name)
Connects to the Unix domain socket or the named pipe.
void bind(const std::string &name)
bind Binds the pipe to a file path (Unix) or a name (Windows).
std::string peer() const noexcept
Gets the name of the Unix domain socket or the named pipe to which the handle is connected.
void pending(int count) noexcept
Sets the number of pending pipe this instance can handle.
details::UVHandleType HandleType
details::UVTypeWrapper< uv_file > FileHandle