33 [[nodiscard]]
Result<std::
size_t>
write(std::span<const std::
byte> data) override;
38 [[nodiscard]]
Result<std::
size_t>
read(std::span<std::
byte> buffer) override;
44 [[nodiscard]]
bool isOpen() const noexcept override;
47 [[nodiscard]] std::string_view
name() const noexcept override;
50 [[nodiscard]] std::
size_t capacity() const noexcept;
53 [[nodiscard]] std::
size_t size() const noexcept;
Common interface for IPC channels.
Pipe & operator=(const Pipe &)=delete
std::string_view name() const noexcept override
Pipe name.
bool isOpen() const noexcept override
Returns whether the pipe is open.
Pipe(std::string name, std::size_t capacity=1024)
Creates a pipe with a logical name and capacity.
Result< std::size_t > write(std::span< const std::byte > data) override
Writes bytes into the pipe buffer.
void close() override
Closes the pipe and clears buffered data.
Result< std::size_t > read(std::span< std::byte > buffer) override
Reads bytes from the pipe buffer in FIFO order.
std::unique_ptr< Impl > impl_
std::size_t size() const noexcept
Current number of buffered bytes.
Pipe(const Pipe &)=delete
std::size_t capacity() const noexcept
Maximum number of bytes that can be buffered.
A result type that holds either a success value of type T or an ErrorCode.
IIpcChannel interface for inter-process communication channels.