On 11/03/2015 11:02 PM, Phil Rosenberg wrote: > Hi Ken > Thanks for the advice. As you say, my callback is not being called AT > ALL. Here is my start call
That is truly strange. Not even once on the first request? Have you tried something like 'fprintf' in the callback and connecting to the port with TELNET and doing a "GET / http/1.1"-style request by hand? If the callback still isn't called even once, then double-check that you did actually call MHD_start_daemon(). > m_daemon = MHD_start_daemon( > MHD_USE_THREAD_PER_CONNECTION, > port, > NULL, > NULL, > &HttpDaemon::connectionCallback, > this, > MHD_OPTION_NOTIFY_COMPLETED, &HttpDaemon::completeCallback, NULL, > //variables which allow post to be processed > MHD_OPTION_END); > > Since posting I have tried MHD_USE_SELECT_INTERNALLY and this seems to > be working fine. Processing each request is very fast so the multi > threading I guess isn't needed. Eh, it's actually typically slower and only useful if your callback is blocking and that can't be helped. Happy hacking! Christian p.s.: the fix in 0.9.46 probably won't help you, as it only impacts pipelined connections and not if you're not called at all.
signature.asc
Description: OpenPGP digital signature
