...
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user