1#ifndef LIBFILEZILLA_GLUE_ASYNC_PIPE_HEADER
2#define LIBFILEZILLA_GLUE_ASYNC_PIPE_HEADER
36struct pipe_event_type;
56class FZ_PUBLIC_SYMBOL async_pipe final
65 async_pipe(async_pipe
const&) =
delete;
66 async_pipe& operator=(async_pipe
const&) =
delete;
68 bool connect_named_pipe(std::wstring_view name);
90 return write(s.data(), s.size());
102 buffer write_buffer_;
103 HANDLE sync_{INVALID_HANDLE_VALUE};
104 OVERLAPPED ol_read_{};
105 OVERLAPPED ol_write_{};
106 rwresult write_error_{0};
107 std::optional<rwresult> terminal_read_result_;
108 bool waiting_read_{
true};
109 bool waiting_write_{};
112 HANDLE read_{INVALID_HANDLE_VALUE};
113 HANDLE write_{INVALID_HANDLE_VALUE};
119#error This file is for Windows only
rwresult write(void const *buffer, size_t len)
Write data data process.
rwresult read(void *buffer, size_t len)
Read data from process.
Definition buffer.hpp:200
Definition event_handler.hpp:63
Lean replacement for std::(recursive_)mutex.
Definition mutex.hpp:75
Holds the result of read/write operations.
Definition fsresult.hpp:80
This is the recommended event class.
Definition event.hpp:68
A dumb thread-pool for asynchronous tasks.
Definition thread_pool.hpp:64
Declares event_base and simple_event<>
result and rwresult wrappers for dealing with file system errors.
Sets some global macros and further includes string.hpp.
The namespace used by libfilezilla.
Definition apply.hpp:17
simple_event< pipe_event_type, async_pipe *, pipe_event_flag > pipe_event
Definition async_pipe.hpp:53
pipe_event_flag
The type of a pipe event.
Definition async_pipe.hpp:27
@ read
Data has become available.
Definition process.hpp:29
@ write
data can be written.
Definition process.hpp:32
Declares thread_pool and async_task.