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
IPv6 Not Supported #275
Comments
Thanks for pointing that out. The thing is that libmicrohttpd can be configured very differently, covering all ways through the constructor is probably not a good idea. Do you have a suggestion how to deal with this? |
The only place to enable IPv6 in libmicrohttpd is in the call to CMakeLists.txt:
httpserver.cpp: bool HttpServer::StartListening() {
if (!this->running) {
const bool has_epoll =
(MHD_is_feature_supported(MHD_FEATURE_EPOLL) == MHD_YES);
const bool has_poll =
(MHD_is_feature_supported(MHD_FEATURE_POLL) == MHD_YES);
- unsigned int mhd_flags;
+ unsigned int mhd_flags = 0;
+#if defined(HAVE_IPV6)
+ mhd_flags |= MHD_USE_DUAL_STACK;
+#endif
if (has_epoll)
// In MHD version 0.9.44 the flag is renamed to
// MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY. In later versions both
// are deprecated.
#if defined(MHD_USE_EPOLL_INTERNALLY)
- mhd_flags = MHD_USE_EPOLL_INTERNALLY;
+ mhd_flags |= MHD_USE_EPOLL_INTERNALLY;
#else
- mhd_flags = MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY;
+ mhd_flags |= MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY;
#endif
else if (has_poll)
- mhd_flags = MHD_USE_POLL_INTERNALLY;
+ mhd_flags |= MHD_USE_POLL_INTERNALLY;
if (this->bindlocalhost) { |
Can u give me url of pinoy channel |
IPv6 is not supported by libjson-rpc-cpp. However, it it supported by libmicrohttpd.
The simplest way to get IPv6 working is to pass MHD_USE_DUAL_STACK in the flags to MHD_start_daemon, but this will cause MHD_start_daemon to fail if IPv6 is not supported by the system.
The text was updated successfully, but these errors were encountered: