ws has a --version option
This commit is contained in:
parent
1fdbc2bc22
commit
a1f3c40a2d
@ -1 +1 @@
|
|||||||
6.3.2
|
6.3.3
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [6.3.3] - 2019-09-30
|
||||||
|
|
||||||
|
- ws has a --version option
|
||||||
|
|
||||||
## [6.3.2] - 2019-09-29
|
## [6.3.2] - 2019-09-29
|
||||||
|
|
||||||
- (http + websocket clients) can specify cacert and some other tls options (not implemented on all backend). This makes it so that server certs can finally be validated on windows.
|
- (http + websocket clients) can specify cacert and some other tls options (not implemented on all backend). This makes it so that server certs can finally be validated on windows.
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define IX_WEBSOCKET_VERSION "6.3.2"
|
#define IX_WEBSOCKET_VERSION "6.3.3"
|
||||||
|
13
ws/ws.cpp
13
ws/ws.cpp
@ -15,6 +15,7 @@
|
|||||||
#include <ixcore/utils/IXCoreLogger.h>
|
#include <ixcore/utils/IXCoreLogger.h>
|
||||||
#include <ixwebsocket/IXNetSystem.h>
|
#include <ixwebsocket/IXNetSystem.h>
|
||||||
#include <ixwebsocket/IXSocket.h>
|
#include <ixwebsocket/IXSocket.h>
|
||||||
|
#include <ixwebsocket/IXUserAgent.h>
|
||||||
#include <spdlog/spdlog.h>
|
#include <spdlog/spdlog.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -39,7 +40,6 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CLI::App app {"ws is a websocket tool"};
|
CLI::App app {"ws is a websocket tool"};
|
||||||
app.require_subcommand();
|
|
||||||
|
|
||||||
std::string url("ws://127.0.0.1:8008");
|
std::string url("ws://127.0.0.1:8008");
|
||||||
std::string path;
|
std::string path;
|
||||||
@ -79,6 +79,7 @@ int main(int argc, char** argv)
|
|||||||
bool greetings = false;
|
bool greetings = false;
|
||||||
bool binaryMode = false;
|
bool binaryMode = false;
|
||||||
bool redirect = false;
|
bool redirect = false;
|
||||||
|
bool version = false;
|
||||||
int port = 8008;
|
int port = 8008;
|
||||||
int redisPort = 6379;
|
int redisPort = 6379;
|
||||||
int statsdPort = 8125;
|
int statsdPort = 8125;
|
||||||
@ -103,6 +104,8 @@ int main(int argc, char** argv)
|
|||||||
"A (comma/space/colon) separated list of ciphers to use for TLS");
|
"A (comma/space/colon) separated list of ciphers to use for TLS");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
app.add_flag("--version", version, "Connection url");
|
||||||
|
|
||||||
CLI::App* sendApp = app.add_subcommand("send", "Send a file");
|
CLI::App* sendApp = app.add_subcommand("send", "Send a file");
|
||||||
sendApp->add_option("url", url, "Connection url")->required();
|
sendApp->add_option("url", url, "Connection url")->required();
|
||||||
sendApp->add_option("path", path, "Path to the file to send")
|
sendApp->add_option("path", path, "Path to the file to send")
|
||||||
@ -402,6 +405,14 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
ret = ix::ws_redis_server_main(port, hostname);
|
ret = ix::ws_redis_server_main(port, hostname);
|
||||||
}
|
}
|
||||||
|
else if (version)
|
||||||
|
{
|
||||||
|
std::cout << "ws " << ix::userAgent() << std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cerr << "A subcommand or --version is required" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
ix::uninitNetSystem();
|
ix::uninitNetSystem();
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user