code: def get_sockinfo (host, port=None):
      
      family, socktype = socket.AF_INET, socket.SOCK_STREAM
      return socket.getaddrinfo(host, port, family, socktype)
docs: Return socket.getaddrinfo for given host and port.