Alvaro,
Could you *please* explain me again. I have asked this many times, but I
still have questions about it when I am implementing plugins. Lets take
the problem:
ret_t
cherokee_handler_server_info_step (cherokee_handler_server_info_t *hdl,
cherokee_buffer_t *buffer)
{
if (hdl->buffer.len > 0) {
cherokee_buffer_add_buffer (buffer, &hdl->buffer);
cherokee_buffer_move_to_begin (&hdl->buffer, buffer->size);
if (hdl->buffer.len == 0)
return ret_eof_have_data;
return ret_ok;
} else
return ret_eagain;
}
vs
ret_t
cherokee_handler_server_info_step (cherokee_handler_server_info_t *hdl,
cherokee_buffer_t *buffer)
{
cherokee_buffer_add_buffer (buffer, &hdl->buffer);
return ret_eof_have_data;
}
Why is implementation 1 not defaultly used. Why doesn't implementation 2
with for example java when sending large documents? It would mean the
world for me if you elaborate on these examples and maybe the 'chunked'
variant.
Stefan
Could you *please* explain me again. I have asked this many times, but I
still have questions about it when I am implementing plugins. Lets take
the problem:
ret_t
cherokee_handler_server_info_step (cherokee_handler_server_info_t *hdl,
cherokee_buffer_t *buffer)
{
if (hdl->buffer.len > 0) {
cherokee_buffer_add_buffer (buffer, &hdl->buffer);
cherokee_buffer_move_to_begin (&hdl->buffer, buffer->size);
if (hdl->buffer.len == 0)
return ret_eof_have_data;
return ret_ok;
} else
return ret_eagain;
}
vs
ret_t
cherokee_handler_server_info_step (cherokee_handler_server_info_t *hdl,
cherokee_buffer_t *buffer)
{
cherokee_buffer_add_buffer (buffer, &hdl->buffer);
return ret_eof_have_data;
}
Why is implementation 1 not defaultly used. Why doesn't implementation 2
with for example java when sending large documents? It would mean the
world for me if you elaborate on these examples and maybe the 'chunked'
variant.
Stefan