Hi Gregory! I believe you're talking about mg_send_data() function, not mg_send(). mg_send() returns either 0 or the 3rd parameter, number of bytes mg_send_data() returns the size of output IO buffer.
Both functions do not send data to the socket. mg_printf() and mg_printf_data() are the same in this respect by the way. These functions only append the data to the output buffer, and mongoose sends that data later on. That is by design, and the reason is that these functions must not block the execution. Mongoose is asynchronous and non-blocking. Hope that helps. On Fri, Aug 29, 2014 at 2:15 AM, gregory kosinovsky <[email protected]> wrote: > It appears that the problem I saw earlier comes from the fact that -- for > multiple calls to mg_write -- the last return value reflects the SUM of all > previously written sizes. This indicates that the server is not sending the > data as it arrives, but is buffering it. What would be the cause of such > behavior and how would this be fixed? > > Thank you, > > Greg > > -- > 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/d/optout. > -- 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/d/optout.
