this post was submitted on 07 Oct 2024
4 points (100.0% liked)
The C Programming Language
632 readers
6 users here now
Everything related to the C programming language.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
But why two different functions? If I recall correctly, port address can be between 0 to 65535, which will fit under
uint16_t
. What use woulduint32_t
have? Is there any other use forhtonl()
?I don't usually use networking in C or C++, so I can't say for sure. But I did I find this quote that might explain it: