projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0f1ee5
)
bugfix: vtable was not setup for client sockets
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Wed, 18 Oct 2023 13:35:56 +0000
(08:35 -0500)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Wed, 18 Oct 2023 13:35:56 +0000
(08:35 -0500)
core/net/net.onyx
patch
|
blob
|
history
diff --git
a/core/net/net.onyx
b/core/net/net.onyx
index beec0e93ad2b0eda2733ee318c6637e394596357..4b4c4f9a0b17d9d33ad34162f57b47e70d8ee242 100644
(file)
--- 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(" ");
}