Closed JamieMeyers closed 11 years ago
The flags in send_callback and read_callback is a little bit different from flags in SPDY frame. It is intended to work like flags in read(2) or write(2) system call and convey some performance optimization hits. At the moment, that facility is not implemented and they are always 0. The source of the confusion is that they are not properly documented. I'll document this in read_callback and write_callback documentation.
FYI, if you want to know the outgoing flags in SPDY frame, use on_ctrl_send_callback and on_data_send_callback.
Thanks for explaining the documentation issue.
Documented this. Closing.
https://github.com/tatsuhiro-t/spdylay/blob/master/lib/spdylay_session.c#L1528
In spdylay_session_send, send_callback always is passed flags set to 0, instead of the correct flags for the data or control frame.
Here is a quick patch:
int flags = (session->aob.item->frame_cat == SPDYLAY_CTRL) ? spdylay_outbound_item_get_ctrl_frame(session->aob.item)->ctrl.hd.flags : spdylay_outbound_item_get_data_frame(session->aob.item)->flags; sentlen = session->callbacks.send_callback(session, data, datalen, flags, session->user_data);