libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Binding to a specifc address on Windows


From: Evgeny Grin
Subject: Re: [libmicrohttpd] Binding to a specifc address on Windows
Date: Mon, 11 Mar 2019 23:17:13 +0300

HI Daniel,
 
Please clarify, whether do you want to use MHD on Windows natively or with MSys POSIX transformation layer?
It is two different tasks.
 
-- 
Best Wishes,
Evgeny Grin
 
 
 
05.03.2019, 17:21, "Daniel Kraft" <address@hidden>:

Hi!

I'm using libmicrohttpd indirectly through libjson-rpc-cpp. Currently,
this starts the HTTP server to always listen on all interfaces. I would
like to change this so that the server binds only to localhost (or more
generally to a specific address).

According to the documentation, I can use MHD_OPTION_SOCK_ADDRESS to
achieve this. It works fine for me on GNU/Linux, and someone from my
team was also able to compile the code (with some tweaks) on Windows
with MSYS.

However, the option expects the binding address as "struct sockaddr",
which as far as I can tell is POSIX and not standard C. Thus, I wonder
if that is the correct way to bind microhttpd to a specific address on
Windows (which microhttpd states to support officially). Is it, or am I
missing something here?

Thank you very much!

Yours,
Daniel
 

--
https://www.domob.eu/
OpenPGP: 1142 850E 6DFF 65BA 63D6 88A8 B249 2AC4 A733 0737
Namecoin: id/domob -> https://nameid.org/?name=domob
--
3.6.0: Bar-Pri-Ran-Rog-Sam-Val-Wiz
To go: Arc-Cav-Hea-Kni-Mon-Tou

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]