From 2f5f5037137dace4f242d815ff70b8596628b9c2 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Wed, 18 Oct 2023 08:35:56 -0500 Subject: [PATCH] bugfix: vtable was not setup for client sockets --- core/net/net.onyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/net/net.onyx b/core/net/net.onyx index beec0e93..4b4c4f9a 100644 --- a/core/net/net.onyx +++ b/core/net/net.onyx @@ -156,6 +156,7 @@ socket_create :: (family: SocketFamily, type: SocketType, proto: SocketProto) -> s.flags |= .Block_On_Read; s.alive = true; + s.vtable = &__net_socket_vtable; return .{ Ok = s }; } @@ -478,8 +479,8 @@ ipv4_to_str :: (addr: u32) -> str { // This returns a volatile buffer that should be copied. ipv6_to_str :: (addr: [16] u8) -> str { return iter.as_iter(addr) - |> iter.map(x => tprintf("{w2b16}", cast(u32) x)) - |> iter.collect() + ->map(x => tprintf("{w2b16}", cast(u32) x)) + ->collect() |> string.join(" "); } -- 2.25.1