I plan to ditch MG_REQUEST_CALL_AGAIN feature, it is too messy IMO.
Instead, on each mg_poll_server(), a callback will be called with POLL
event,
regardless of the "long-running" status.

Mongoose data sending functions do not actually send() the data to the
browser.
They append the data to the output buffer and return immediately, to ensure
non-blocking nature of the callback.

Mongoose sends data on each mg_poll_server() iteration if socket is able to
send.



On Fri, Feb 21, 2014 at 6:28 AM, <[email protected]> wrote:

> I too am having a problem with a variation of this. It seems that when the
> handler is called again due to MG_REQUEST_CALL_AGAIN that neither
> mg_printf_data nor mg_send_data will actually send data to the browser. Is
> this by design and I'm just not understanding or is it a bug?
>
> What I'm ultimately trying to do is pass lengthy requests off to a thread
> and for each MG_REQUEST_CALL_AGAIN iteration I check to see if the thread
> has finished. However, in trying to debug why nothing was getting to the
> browser I ended up with simple code similar to the above.
>
> --
> You received this message because you are subscribed to the Google Groups
> "mongoose-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/mongoose-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to