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:
1 parent
9a3c5d86ef
commit
39a48d5c0a
13 files changed
+4187
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user