I'm studying socket programming and I learned inet_addr
function. But I'm confused how can I handle in_addr_t
type.
inet_addr
function returns in_addr_t
type which is uint32_t
, then do I have to use uint32_t
type variable to handle it?
In the book, example handles it as unsigned long
type, but I don't understand why this way is used.
unsigned long conv_addr = inet_addr(addr1); // unsigned long == uint32_t?