Search code examples
c++structwinsockdata-members

Explanation needed for the in_addr strcuture


I do not understand MSDN's documentation for it's member's at all. It ask for things I've never done before like the S_un_b member needs The IPv4 address of the host formatted as four u_chars. which doesn't really make sense to me unless it means something like type casting but I don't think that's it. Any examples, documentation, hints, tips, etc would be very greatly appreciated! :)


Solution

  • The IPv4 address of the host formatted as four u_chars

    means that the host address in IPv4 format (eg 209.81.97.0) is stored as 4 consecutive unsigned chars each being 8 bits wide.