code: def create_connction(host, port, protocol):
      
      ai_list = socket.getaddrinfo(host, port, socket.AF_UNSPEC,
                                   socket.SOCK_STREAM)
      for (family, socktype, proto, canon, sockaddr) in ai_list:
          sock = socket.socket(family, socktype)
          # WRAP SOCKET
          if port == 443:
              sock = ssl.wrap_socket(sock, ssl_version=protocol)
          sock.connect(sockaddr)
          return sock
docs: Create connection to socket host/port
      :param host srt: - host to connect
      :param port int: - port to connect
      :return socket: - open connection