[Top][All Lists]

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

[libmicrohttpd] Creating instances in the option MHD_OPTION_URI_LOG_CALL

From: silvioprog
Subject: [libmicrohttpd] Creating instances in the option MHD_OPTION_URI_LOG_CALLBACK
Date: Sun, 7 Aug 2016 21:26:28 -0300

Hello listers,

I have a Pascal object representing the request so it is created for each browser request, and MHD maintains the life cycle of that one. So far so good, but the only problem is about my approach choice, I used the option MHD_OPTION_URI_LOG_CALLBACK to create the object and the MHD_OPTION_NOTIFY_COMPLETED to free that one.

Researching at Google, I've seen some people using this approach too, for example (in C++):

Routines attribution:

Object life cycle management:

Anyway, I have some doubts. When I set a routine to the MHD_OPTION_URI_LOG_CALLBACK option, is this one always called once time for each request? If so, that's OK, otherwise, which one can I use instead?

Researching more a bit, I've found many examples using the parameter `con_cls` as a flag:

However, this approach is a little bit hard to be maintained in the oriented object programming, and it was the reason that I chose the "first called routine" instead of using the `con_cls` as a flag.

Thank you!

Silvio Clécio

reply via email to

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