Socket :: extracted getDomainByName() from getDomain()