This commit is contained in:
agra
2026-02-20 21:50:49 +02:00
parent 2f95810f9d
commit efa60fa670
12 changed files with 148 additions and 103 deletions

View File

@@ -29,5 +29,5 @@ SockAddr :: struct {
}
htons :: (port: s64) -> u16 {
cast(u16) ((port / 256) | ((port % 256) * 256));
cast(u16) (((port & 0xFF) << 8) | ((port >> 8) & 0xFF));
}