static void do_proceed(h2o_generator_t *generator, h2o_req_t *req) { struct rp_generator_t *self = (void *)generator; h2o_doublebuffer_consume(&self->sending); do_send(self); }
static void do_proceed(h2o_generator_t *_generator, h2o_req_t *req) { h2o_mruby_generator_t *generator = (void *)_generator; h2o_mruby_chunked_t *chunked = generator->chunked; h2o_buffer_t **input; int is_final; h2o_doublebuffer_consume(&chunked->sending); switch (chunked->type) { case H2O_MRUBY_CHUNKED_TYPE_CALLBACK: input = &chunked->callback.receiving; is_final = mrb_nil_p(chunked->body_obj); break; case H2O_MRUBY_CHUNKED_TYPE_SHORTCUT: if (chunked->shortcut.client != NULL) { input = h2o_mruby_http_peek_content(chunked->shortcut.client, &is_final); assert(!is_final); } else { input = &chunked->shortcut.remaining; is_final = 1; } break; default: h2o_fatal("unexpected type"); break; } do_send(generator, input, is_final); }