summaryrefslogtreecommitdiff
path: root/src/Client.zig
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2025-04-19 22:25:52 -0400
committerRobby Zambito <contact@robbyzambito.me>2025-04-19 22:26:32 -0400
commitc34748dab3def4dbb1deea7240ab3d4ef17ef161 (patch)
treed137b48bc5227f936167b5d9a59313e1adc202ad /src/Client.zig
parent5b88f0df6a29958942af5977ab36e94de4eef00e (diff)
Add CLI to specify dest for relay messagesHEADmaster
The dest can be specified as a 4 char ASCII string, or as an IPv4 address.
Diffstat (limited to 'src/Client.zig')
-rw-r--r--src/Client.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Client.zig b/src/Client.zig
index 8f60326..19f8360 100644
--- a/src/Client.zig
+++ b/src/Client.zig
@@ -39,10 +39,10 @@ fn broadcastSaprusMessage(msg: SaprusMessage, udp_port: u16, allocator: Allocato
_ = try sock.sendTo(dest_addr, msg_bytes);
}
-pub fn sendRelay(payload: []const u8, allocator: Allocator) !void {
+pub fn sendRelay(payload: []const u8, dest: [4]u8, allocator: Allocator) !void {
const msg = SaprusMessage{
.relay = .{
- .header = .{ .dest = .{ 70, 70, 70, 70 } },
+ .header = .{ .dest = dest },
.payload = payload,
},
};