On 17 March 2017 at 15:43, Evgeny Grin <[email protected]> wrote: > You don't need to make this check only inside callback function. If you > suspend connection and resume it later - connection conditions are not > changed, you will not get any new information in callback. So you can > store required information in your internal structures and check it > *before* resuming, not *after* resuming.
Seems to be I got the point. Thanks for the advice. > Resume/suspend repeated cycles without processing of information - is > ineffective and wastes a lot of resources. There is a little problem. If I would proceed the data and right after that I suspend the connection, then I must keep this (read) data somewhere, because a new data already is arrived. This leads to next problem: more suspended connections means that the app. will keep even more data (one proceeded, one in MHD buffers). IMHO, 1) the application becomes overcomplicated; 2) there is even more wasting of resources. Either, I chose the wrong tool :) > PS If you will check master on official git, you may find support of > your ineffective way of processing. Yes, I have tested the patch. As I suggested early, it's works flawlessly. It is harmless, even if you say that is "wrong way" :) Ok, lets finish at this point, I must finish my project. Later, I will give you a feedback. Thanks again! -- With Best Regards, Vitaliy V. Tokarev
