-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broker command line options and build executable #772
Conversation
7aadd03
to
a78e4f6
Compare
Codecov Report
@@ Coverage Diff @@
## master #772 +/- ##
=======================================
Coverage 85.05% 85.05%
=======================================
Files 61 61
Lines 8684 8684
=======================================
Hits 7386 7386
Misses 1298 1298 |
I'm not sure why it happened but your PR seems to contain already merged change. For example is aaa61d1#diff-8438e6574a9cbca06fc27190e2dab4239f23e5e53b736428ad7b1d37dec831e7R329 Rebase might solve the problem....? |
Basically, I agree to add commandline options to the example broker.
But I don't think enabler and port pattern is good. I think that the better approach is only if Set the default By the way, if both |
Yes. Made small mistake there with rebase |
What do you think about the executable build by CI now? I think it is useful to add to downloads on release, but maybe only build on tagged commit? |
But then what if you want to enable tcp and use default port --tcp.port Or maybe: But that would be the same as I have now: Start with default: (1883) Start with non-default port |
And what about naming tls and tlsws or mqqts and wss? |
a78e4f6
to
f520af6
Compare
The branch is now properly based |
Static linking does give a warning, so I am not sure if it is really possible to completely static link the executable:
|
f520af6
to
80f9787
Compare
I removed the changes to CI from this PR, I will make a separate PR for this |
CMakeLists.txt
Outdated
ENDIF () | ||
|
||
IF (MQTT_USE_TLS) | ||
FIND_PACKAGE (OpenSSL REQUIRED) | ||
IF (MQTT_USE_STATIC_OPENSSL) | ||
FIND_PACKAGE (ZLIB REQUIRED) | ||
IF (UNIX AND NOT APPLE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also related to making a static build with CI, so I should move this to separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you move this to other PR ? Or is it required to pass CI ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is moved to other PR
I mean if If user writes
Use 5678 as TCP port, If user set command line option, then it is used: And we can provide the default |
But this means you always have to specify the port, to enable TCP protocol |
Yes. It is no problem. |
You mean this ?
I know this is widely used but I don't think it is good name for options. Here is the straight forward notation that reflects protocol layer:
I think that it is too complicated. How about this?
There is no |
May be we need config file not found case process: |
Yes I think this is best option |
test/system/test_server_tls.hpp
Outdated
), | ||
std::move(ctx), | ||
std::forward<boost::asio::ssl::context>(ctx), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::forward<boost::asio::ssl::context>(ctx), | |
MQTT_NS::force_move(ctx), |
ctx is rvalue-reference not forwarding reference in your code.
test/system/test_server_tls_ws.hpp
Outdated
), | ||
std::move(ctx), | ||
std::forward<boost::asio::ssl::context>(ctx), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::forward<boost::asio::ssl::context>(ctx), | |
MQTT_NS::force_move(ctx), |
ctx is rvalue-reference not forwarding reference in your code.
80f9787
to
4d1f151
Compare
I think I changed spaces to tabs now, the coding rules does not says tabs vs spaces ? |
I will add this. Please use spaces. |
Error copying file "/Users/runner/work/mqtt_cpp/mqtt_cpp/example/server.key.pem" to "/Users/runner/work/_temp/example/broker.key.pem". on macos. Strange ... |
d2d7f64
to
b048759
Compare
a2a21d0
to
827ffea
Compare
Maybe include a systemd init script for running the broker as well ? |
Sorry for my late merge. I'm under winter holidays :) |
I added command line options (and config file) to configure the broker.