throw exception if no connection could be made
port should always be an int