Implemented network byte order conversion
This commit is contained in:
parent
084edba480
commit
79bb606e8d
4 changed files with 6 additions and 3 deletions
3
lib/net/htons.q
Normal file
3
lib/net/htons.q
Normal file
|
@ -0,0 +1,3 @@
|
|||
htons(num Int) -> Int {
|
||||
return ((num & 0xFF) << 8) | (num >> 8)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue