Add header file for struct sockaddr_in.
Remove unnecessary casts.