-
Notifications
You must be signed in to change notification settings - Fork 24
Zeroconf announce for http::Server #208
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
Conversation
ab9064e to
c9cf1da
Compare
zeroeq/http/server.cpp
Outdated
| result.getString())); | ||
| } | ||
|
|
||
| if (uri_.getHost() != uri.getHost() || uri_.getPort() == 0) |
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 should be printed independently of the servus stuff
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.
It is, unless Zeroconf announcement fails in which case the ctor throws anyways.
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.
Correction, it isn't. Fixing.
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.
done
zeroeq/http/server.cpp
Outdated
| const std::string JSON_TYPE = "application/json"; | ||
| const std::string REQUEST_REGISTRY = "registry"; | ||
| const std::string REQUEST_SCHEMA = "schema"; | ||
| const std::string HTTP_SERVER_SERVICE = "_http._tcp"; |
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.
_zeroeqhttp._tcp? otherwise it looks very generic.
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.
Also, add some documentation in the header of the class that this features exists.
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.
I on purpose used the generic service for HTTP servers.
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.
Ah ok. Then mention it for future reference :)
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.
doc added
6416fa5 to
347ffc4
Compare
|
+1 for me. @hernando also should a have look |
hernando
left a comment
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.
Explain a bit more the motivation in the commit message.
| if (!result) | ||
| { | ||
| ZEROEQTHROW(std::runtime_error("Zeroconf announce failed: " + | ||
| result.getString())); |
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 really want to throw if the announcement fails?
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.
Since this is C&P from the Publisher, I guess so?
Currently used by the viztools.Local() python module, but generally of interest for REST clients to find our apps.
Done |
No description provided.