@@ -42,6 +42,7 @@ int main(int argc, char** argv)
4242
4343 Firebolt::LogLevel logLevel = Firebolt::LogLevel::Notice;
4444 std::string url;
45+ std::optional<bool > legacyRPCv1;
4546
4647 for (int i = 1 ; i < argc; ++i)
4748 {
@@ -66,6 +67,14 @@ int main(int argc, char** argv)
6667 }
6768 url = argv[++i];
6869 }
70+ else if (std::string (argv[i]) == " --legacy" )
71+ {
72+ legacyRPCv1 = true ;
73+ }
74+ else if (std::string (argv[i]) == " --rpc-v2" )
75+ {
76+ legacyRPCv1 = false ;
77+ }
6978 else if (std::string (argv[i]) == " --dbg" )
7079 {
7180 logLevel = Firebolt::LogLevel::Debug;
@@ -81,6 +90,8 @@ int main(int argc, char** argv)
8190 std::cout << " --mock Connect to a local mock server instead of the default Firebolt Demo Service" << std::endl;
8291 std::cout << " --platform Connect to the platform's Firebolt service (default if available)" << std::endl;
8392 std::cout << " --url <URL> Specify a custom URL for the Firebolt service" << std::endl;
93+ std::cout << " --legacy Use legacy communication" << std::endl;
94+ std::cout << " --rpc-v2 Use JSON-RPC compliant communication" << std::endl;
8495 std::cout << " --dbg Enable debug logging" << std::endl;
8596 std::cout << " --help Show this help message" << std::endl;
8697 /* clang-format on */
@@ -106,6 +117,10 @@ int main(int argc, char** argv)
106117 config.wsUrl = url;
107118 config.waitTime_ms = 1000 ;
108119 config.log .level = logLevel;
120+ if (legacyRPCv1.has_value ())
121+ {
122+ config.legacyRPCv1 = legacyRPCv1.value ();
123+ }
109124
110125 std::promise<bool > connectionPromise;
111126 std::once_flag connectionOnce;
0 commit comments