Refactored network to use getaddrinfo
Merge pull request #7 from nacx/use-getaddrinfo

Refactored network to use getaddrinfo