37 [[nodiscard]]
virtual bool isOpen() const noexcept = 0;
40 [[nodiscard]] virtual std::string_view
name() const noexcept = 0;
Common interface for IPC channels.
virtual Result< std::size_t > write(std::span< const std::byte > data)=0
Writes up to data.size() bytes into the channel.
virtual void close()=0
Closes the channel and releases transient state.
virtual bool isOpen() const noexcept=0
Returns whether the channel accepts read/write operations.
virtual std::string_view name() const noexcept=0
Human-readable channel name.
virtual Result< std::size_t > read(std::span< std::byte > buffer)=0
Reads up to buffer.size() bytes from the channel.
virtual ~IIpcChannel()=default
A result type that holds either a success value of type T or an ErrorCode.
Error codes and Result<T> type for fallible operations.