thespian/test/remote_child_send.zig

13 lines
526 B
Zig

/// 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);
}