[ee122] question about slide 23 of Sockets ppt

Davide Cerri davide.cerri at gmail.com
Sat Sep 15 15:34:35 PDT 2007

i am trying to follow the code provided, but i get confused by this line

in_addr_t server_addr = *(in_addr_t *) host->h_addr_list[0];

why are we casting and de referencing instead of casting (in_addr_t)
what kind of magic does this trick?
~/Davide Cerri

More information about the ee122 mailing list