From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 18 Apr 2019 21:39:51 +0300 From: Alexander Turenko Subject: Re: [tarantool-patches] [PATCH v3 5/7] net.box: add skip_header option to use with buffer Message-ID: <20190418183950.ucjsj4sedyaozkd7@tkn_work_nb> References: <20190418173733.GM13022@chai> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190418173733.GM13022@chai> To: Konstantin Osipov Cc: tarantool-patches@freelists.org, Vladimir Davydov List-ID: On Thu, Apr 18, 2019 at 08:37:33PM +0300, Konstantin Osipov wrote: > * Alexander Turenko [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] = }. 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.