now it will receive

This commit is contained in:
Vicente Ferrari Smith 2026-01-11 14:49:24 +01:00
parent fab70f7a61
commit 4b61aa5477
3 changed files with 10 additions and 1 deletions

View File

@ -11,6 +11,14 @@
"cwd": "$ZED_WORKTREE_ROOT/",
"build": "zig build",
},
{
"label": "Debug Zig Server",
"adapter": "CodeLLDB",
"request": "launch",
"program": "$ZED_WORKTREE_ROOT/zig-out/bin/server",
"cwd": "$ZED_WORKTREE_ROOT/",
"build": "zig build",
},
// {
// "adapter": "CodeLLDB",
// "label": "zig build run",

View File

@ -123,6 +123,7 @@ pub fn main() !void {
const packet = try znet.Packet.init("Hello, Server!", 0, .reliable);
try peer.send(packet);
}
// _ = peer;
// Update
//----------------------------------------------------------------------------------

View File

@ -44,7 +44,7 @@ pub fn main() !void {
defer shared.chunk.deinitChunk(&the_chunk, allocator);
while (true) {
while (try server.host.service(500)) |event| switch (event) {
while (try server.host.service(0)) |event| switch (event) {
.connect => |data| {
_ = data;
// std.log.info("{}", .{data.peer});