Scala implementation of DNS query