Implemented network byte order conversion

This commit is contained in:
Eduard Urbach 2025-02-08 23:59:19 +01:00
parent 084edba480
commit 79bb606e8d
Signed by: eduard
GPG key ID: 49226B848C78F6C8
4 changed files with 6 additions and 3 deletions

3
lib/net/htons.q Normal file
View file

@ -0,0 +1,3 @@
htons(num Int) -> Int {
return ((num & 0xFF) << 8) | (num >> 8)
}