[tarantool-patches] [PATCH v3 5/7] net.box: add skip_header option to use with buffer

Alexander Turenko alexander.turenko at tarantool.org
Thu Apr 18 21:39:51 MSK 2019


On Thu, Apr 18, 2019 at 08:37:33PM +0300, Konstantin Osipov wrote:
> * Alexander Turenko <alexander.turenko at tarantool.org> [19/04/10 18:23]:
> > Needed for #3276.
> > 
> > @TarantoolBot document
> > Title: net.box: skip_header option
> > 
> > This option instructs net.box to skip {[IPROTO_DATA_KEY] = ...} wrapper
> > from a buffer. This may be needed to pass this buffer to some C function
> > when it expects some specific msgpack input.
> 
> I'm sorry I don't understand from this comment what this function
> does and why. I would expect it to skip entire IPROTO_HEADER and
> only return IPROTO_BODY. Does it?

net.box with `buffer` option already skip a packet header, but
IPROTO_BODY is a singleton map with IPROTO_DATA_KEY as the key and data
itself as the value: {[48] = <data that I need>}.

I'm sorry that the description is confusing. It seems I should provide
more context here: give an example of iproto packet (say, result of a
box's select); then show a part that will be written to a buffer without
this option and with.



More information about the Tarantool-patches mailing list