Niels Provos wrote:
It would be the easiest if you were to give some example code.  There
are two callbacks that libevent supports.  One gives you all data at
the end of the request and the other one gives you updates as chunks
arrive.

What are the two callbacks that libevent supports? I looked through the regression code and found the EVBUFFER_DATA function, but that seems to be the working buffer. When I used that, I would get the beginning portion of the POSTed data. I assume that is the method of accessing the working buffer. Do I have to replace the cb stored in the evbuffer struct that is stored in the evhttp_onnection struct?

I would be more interested in the "updates as chunks arrive" callback, but would be interested both.

Thank you in advance!

On 3/5/07, Elliot F <[EMAIL PROTECTED]> wrote:
Hello all,

I'm writing a small web server using libevent's http layer, and would
like some pointers on how to continue reading the input buffer.  The end
goal is a stream parser for a multipart/form-data.  If one already
exists, please let me know.

When using 'EVBUFFER_DATA(evhttp_request->input_buffer)', I only get a
portion of the upload.  I'm assuming/hoping there is some way of
associating a callback with that connection (or vice versa) to continue
reading any data related to that request.  Could someone point me in the
right direction?  Any tips and/or advice are welcome, including pointers
to example code.

Thank you in advance,

Elliot F
_______________________________________________
Libevent-users mailing list
[email protected]
http://monkey.org/mailman/listinfo/libevent-users


_______________________________________________
Libevent-users mailing list
[email protected]
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to