libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Listen on a specific address?


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Listen on a specific address?
Date: Tue, 2 Feb 2010 14:08:10 +0100
User-agent: KMail/1.12.4 (Linux/2.6.32-trunk-amd64; KDE/4.3.4; x86_64; ; )

On Monday 01 February 2010 19:03:59 Baldur Gislason wrote:
> I've used libmicrohttpd for a while, it works great. However I have
> one question.
> I've been looking through the documentation and I'm a bit lost. Is
> there no way to make libmicrohttpd bind to a specific address and not
> INADDR_ANY?

There is an option for that:

  /**
   * Bind daemon to the supplied sockaddr. this option should be followed by a
   * 'struct sockaddr *'.  If 'MHD_USE_IPv6' is specified, the 'struct 
sockaddr*'
   * should point to a 'struct sockaddr_in6', otherwise to a 'struct 
sockaddr_in'.
   */
  MHD_OPTION_SOCK_ADDR = 6,


Best,

Christian




reply via email to

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