mirror of
https://github.com/ion232/reticulum-zig.git
synced 2025-12-22 06:37:05 +00:00
25 lines
632 B
Zig
25 lines
632 B
Zig
const std = @import("std");
|
|
const core = @import("core");
|
|
const io = @import("io");
|
|
|
|
pub fn main() !void {
|
|
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
|
defer _ = gpa.deinit();
|
|
|
|
const ally = gpa.allocator();
|
|
var clock = try io.system.Clock.init();
|
|
var system = core.System{
|
|
.clock = clock.clock(),
|
|
.rng = std.crypto.random,
|
|
};
|
|
|
|
var node = try core.Node.init(ally, &system, null, .{});
|
|
const host = "amsterdam.connect.reticulum.network";
|
|
const port = 4965;
|
|
|
|
var driver = try io.driver.Tcp.init(&node, host, port, ally);
|
|
defer driver.deinit();
|
|
|
|
try driver.run();
|
|
}
|