implements constructor for InternetSockAddr
fixes the way exceptions are thrown
Adds a few unit tests