This looks very close to what I am doing. However, I am also building
frames on the fly and I can go into short sleeps (inside a while loop) when
generating frames. Can this cause a problem? (it never did before)
Greg
On Friday, August 29, 2014 1:37:38 PM UTC-7, jshanab wrote:
>
> is there anything special needed for something like...
>
> HTTP/1.0 200 OK
> Status: 200
> Connection: close
> Content-type: multipart/x-mixed-replace;boundary =--myboundary
>
> --myboundary
> Content-type: image/jpeg
> Content-length: 203622
>
> {binary data}
>
> --myboundary
> Content-type: image/jpeg
> Content-length: 203218
>
> {binary data}
>
> and so on in which each frame, with the --myboundary and the headers is
> sent at each event loop iteration if the frame is ready.
>
> The thread I had before just looped calling my getframe() which blocked
> until the frame is ready.
>
>
>
>
>
>
>
> On Fri, Aug 29, 2014 at 3:55 PM, Sergey Lyubka <[email protected]
> <javascript:>> wrote:
>
>> Basically,
>>
>> if mg_write() is used, then HTTP headers must include content-length:
>>
>> case MG_REQUEST:
>> mg_write(conn, "HTTP/1.0 200 OK\r\n"
>> "Content-Length: %d\r\n\r\n", my_len);
>> mg_write(conn, .......); // "frames". Total data len must be my_len
>> mg_write(conn, .......);
>> return MG_TRUE;
>>
>>
>>
>>
>>
>> On Fri, Aug 29, 2014 at 7:56 PM, gregory kosinovsky <[email protected]
>> <javascript:>> wrote:
>>
>>> Is mg_more used for processing multiple frames in the same request? Do
>>> you have an example for doing that?
>>>
>>> Thank you,
>>>
>>> Greg
>>>
>>>
>>> On Thursday, August 28, 2014 4:44:29 PM UTC-7, gregory kosinovsky wrote:
>>>>
>>>> The return value on my mg_write(mg_connection*, void *, int) is about 2
>>>> times what's expected -- my last parameter was set to 117072, but mg_write
>>>> returned 234300 (not exactly 2x, but very very close).
>>>>
>>>> What could be causing this?
>>>>
>>>> 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] <javascript:>.
>>> To post to this group, send email to [email protected]
>>> <javascript:>.
>>> 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> 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.