WIP refactor: add remote_poc_test
This commit is contained in:
parent
ddc06d67d6
commit
47f4202b94
6 changed files with 212 additions and 0 deletions
13
test/remote_child_send.zig
Normal file
13
test/remote_child_send.zig
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/// Child process for the remoting POC test.
|
||||
/// Writes one framed CBOR send_named message to stdout and exits.
|
||||
const std = @import("std");
|
||||
const cbor = @import("cbor");
|
||||
const framing = @import("framing");
|
||||
|
||||
pub fn main() !void {
|
||||
var msg_buf: [256]u8 = undefined;
|
||||
var stream: std.Io.Writer = .fixed(&msg_buf);
|
||||
try cbor.writeValue(&stream, .{ "send_named", @as(u64, 1), "test_actor", .{ "hello", "from_child" } });
|
||||
const payload = stream.buffered();
|
||||
try framing.write_frame(std.fs.File.stdout(), payload);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue