ws connect command has a new option to send in binary mode (still default to text)

This commit is contained in:
Benjamin Sergeant
2019-07-25 15:48:45 -07:00
parent ca9d59c1c1
commit 505e0c79d9
5 changed files with 30 additions and 9 deletions

View File

@ -82,6 +82,7 @@ int main(int argc, char** argv)
bool disableAutomaticReconnection = false;
bool disablePerMessageDeflate = false;
bool greetings = false;
bool binaryMode = false;
int port = 8008;
int redisPort = 6379;
int statsdPort = 8125;
@ -113,6 +114,7 @@ int main(int argc, char** argv)
connectApp->add_option("url", url, "Connection url")->required();
connectApp->add_flag("-d", disableAutomaticReconnection, "Disable Automatic Reconnection");
connectApp->add_flag("-x", disablePerMessageDeflate, "Disable per message deflate");
connectApp->add_flag("-b", binaryMode, "Send in binary mode");
CLI::App* chatApp = app.add_subcommand("chat", "Group chat");
chatApp->add_option("url", url, "Connection url")->required();
@ -250,7 +252,7 @@ int main(int argc, char** argv)
else if (app.got_subcommand("connect"))
{
ret = ix::ws_connect_main(url, disableAutomaticReconnection,
disablePerMessageDeflate);
disablePerMessageDeflate, binaryMode);
}
else if (app.got_subcommand("chat"))
{