libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Using MHD_UpgradeResponseHandle without including in


From: Evgeny Grin
Subject: Re: [libmicrohttpd] Using MHD_UpgradeResponseHandle without including internal.h
Date: Fri, 31 Mar 2017 09:32:36 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hi John,

MHD_UpgradeResponseHandle is intentionally opaque. It's not designed for
direct usage of internal members.
If you define it locally, you'll almost likely to break compatibility
with future version.
MHD uses a lot of opaque structures which are internally changed from
version to version. But as long as application uses only public official
API, those changes don't break compatibility.

Usually MHD has specific API to get information about opaque handle.
What do you want to get from internal members?

-- 
Best Wishes,
Evgeny Grin

On 31.03.2017 0:58, John Duncan wrote:
> I noticed that microhttpd.h only contains only forward defintions of the
> MHD_UpgradeResponseHandle structure.  The file internal.h contains the
> actual structure definition with all members.
> 
>  When I try to include the internal.h file directly, I get tons of
> compilation errors leading me to believe that I'm not supposed to be
> including it.
> 
> My question is, when building my own applications, how am I supposed to
> access member portions of the MHD_UpgradeResponseHandle structure
> without including internal.h.  Am I expected to define the structure
> within my own project headers and use the provided
> MHD_UpgradeResponseHandle pointer as somewhat of an opaque type? 
> 
> I don't mind doing this, I just want to make sure this is the correct
> approach.
> 
> Thanks;
> ~JD



reply via email to

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