address type description tipc_addr_nameseq tipc_addr_name is the server typev is the port identifierand is is the server typev is the lower port numberand is the upper port number is the nodev is the referenceand is tipc_addr_id the optional scope field is one of tipc_zone_scopetipc_cluster_scopeor tipc_node_scope functions the socket module defines the following functionscreate_connection(address [timeout]establishes sock_stream connection to address and returns an already connected socket object address is tuple of the form (hostport)and timeout specifies an optional timeout this function works by first calling getaddrinfo(and then trying to connect to each of the tuples that gets returned fromfd(fdfamilysocktype [proto]creates socket object from an integer file descriptorfd the address familysocket typeand protocol number are the same as for socket(the file descriptor must refer to previously created socket it returns an instance of sockettype getaddrinfo(hostport [,family [socktype [proto [flags]]]]given host and port information about hostthis function returns list of tuples containing information needed to open up socket connection host is string containing host name or numerical ip address port is number or string representing service name (for example"http""ftp""smtp"each returned tuple consists of five elements (familysocktypeprotocanonnamesockaddrthe familysocktypeand proto items have the same values as would be passed to the socket(function canonname is string representing the canonical name of the host sockaddr is tuple containing socket address as described in the earlier section on internet addresses here' an examplegetaddrinfo("www python org", [( , , ,'',( ', ))( , , ,'',( '), ))in this examplegetaddrinfo(has returned information about two possible socket connections the first one (proto= is udp connectionand the second one (proto= is tcp connection the additional parameters to getaddrinfo(can be used to narrow the selection for instancethis example returns information about establishing an ipv tcp connectiongetaddrinfo("www python org", ,af_inet,sock_stream[( , , ,'',( ', )) lib fl ff