[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] options in array for daemon start
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] options in array for daemon start |
Date: |
Fri, 4 Dec 2009 13:18:16 +0100 |
User-agent: |
KMail/1.12.2 (Linux/2.6.31-1-amd64; KDE/4.3.2; x86_64; ; ) |
Hi!
I've committed a change to SVN HEAD (SVN 9691) that implements this (with
minor variations). I'd be thankful for a proper testcase.
Best,
Christian
On Thursday 03 December 2009 09:38:45 Marco Maggi wrote:
> Ciao,
>
> I am writing an MHD binding for a language which makes use
> of an FFI; the current API to start and configure a daemon
> is difficult to use because the FFI does not support
> interfacing with variadic functions.
>
> I wonder if it is possible to add an option to
> "MHD_start_daemon()" which causes the options to be read
> from a C array, somewhat like cURL's "curl_formadd()" does
> with the CURLFORM_ARRAY option. It should be something like:
>
> typedef struct MHD_option_item {
> enum MHD_OPTION key;
> intptr_t val;
> } MHD_option_item;
>
> MHD_option_item ops[3] = {
> { MHD_OPTION_CONNECTION_LIMIT, 100 },
> { MHD_OPTION_CONNECTION_TIMEOUT, 10 },
> { MHD_OPTION_END, 0 }
> };
>
> d = MHD_start_daemon(0, 8080, NULL, NULL, dh, NULL,
> MHD_OPTION_ARRAY, ops,
> MHD_OPTION_END);
>
> TIA
>
--
http://grothoff.org/christian/