feat(IPC): add V1 VDIP framed codec, quota reservations, local UDS/pipe transport, full-duplex Session, and IPCOnly consumer (S-IPC-01..03)

This commit is contained in:
faumaray committed 2026-11-24 15:27:40 +03:00
1 parent 9a3c5d86ef
commit 39a48d5c0a
13 files changed
+4187

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 4.0)
project(VoidIPCOnlyConsumer LANGUAGES CXX)
find_package(Void CONFIG REQUIRED COMPONENTS IPC)
add_executable(void_ipc_only_consumer main.cpp)
target_link_libraries(void_ipc_only_consumer PRIVATE Void::IPC)
target_compile_features(void_ipc_only_consumer PRIVATE cxx_std_26)
enable_testing()
add_test(NAME IPCOnlyConsumer COMMAND void_ipc_only_consumer)
+29
View File
@@ -0,0 +1,29 @@
#include <Void/Async/Executor.hpp>
#include <Void/Binary/ByteBuffer.hpp>
#include <Void/IO/Driver.hpp>
#include <Void/IPC/IPC.hpp>
int main()
{
Void::Binary::ByteBuffer buf{16};
(void)buf.writeString("hi");
auto encoded = Void::IPC::encode_frame(
Void::IPC::FrameHeader{.type = Void::IPC::FrameType::one_way,
.request_id = 0},
buf.view());
if (!encoded.has_value()) {
return 1;
}
Void::IPC::FrameDecoder dec;
auto decoded = dec.feed(encoded->view());
if (!decoded.has_value() || decoded->size() != 1) {
return 2;
}
Void::Async::ManualExecutor exec;
auto drv = Void::IO::Driver::create(exec);
if (!drv.has_value()) {
return 3;
}
(void)(*drv)->shutdown_and_join();
return 0;
}
+5
View File
@@ -136,6 +136,11 @@ if(_has_system_async)
-DCMAKE_DISABLE_FIND_PACKAGE_SQLite3=TRUE)
endif()
has_modules(_has_ipc IPC Core Functional Memory Time Binary Async IO Resilience ObservabilityHooks)
if(_has_ipc)
run_consumer(IPCOnly "${install_prefix}" "IPCOnly" ${_no_external_deps})
endif()
has_modules(_has_obs_hooks ObservabilityHooks)
if(_has_obs_hooks)
run_consumer(ObservabilityHooksOnly "${install_prefix}" "ObservabilityHooksOnly" ${_no_external_deps})