From: Brendan Hansen Date: Wed, 18 Oct 2023 13:35:56 +0000 (-0500) Subject: bugfix: vtable was not setup for client sockets X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=2f5f5037137dace4f242d815ff70b8596628b9c2;p=onyx.git bugfix: vtable was not setup for client sockets --- 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(" "); }