{"action":"closed","issue":{"url":"https://api.github.com/repos/msgpack/msgpack-c/issues/514","repository_url":"https://api.github.com/repos/msgpack/msgpack-c","labels_url":"https://api.github.com/repos/msgpack/msgpack-c/issues/514/labels{/name}","comments_url":"https://api.github.com/repos/msgpack/msgpack-c/issues/514/comments","events_url":"https://api.github.com/repos/msgpack/msgpack-c/issues/514/events","html_url":"https://github.com/msgpack/msgpack-c/issues/514","id":173609774,"number":514,"title":"lib_buffer_unpack / persistent 'parsed' bytes ?","user":{"login":"edsiper","id":369718,"avatar_url":"https://avatars.githubusercontent.com/u/369718?v=3","gravatar_id":"","url":"https://api.github.com/users/edsiper","html_url":"https://github.com/edsiper","followers_url":"https://api.github.com/users/edsiper/followers","following_url":"https://api.github.com/users/edsiper/following{/other_user}","gists_url":"https://api.github.com/users/edsiper/gists{/gist_id}","starred_url":"https://api.github.com/users/edsiper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edsiper/subscriptions","organizations_url":"https://api.github.com/users/edsiper/orgs","repos_url":"https://api.github.com/users/edsiper/repos","events_url":"https://api.github.com/users/edsiper/events{/privacy}","received_events_url":"https://api.github.com/users/edsiper/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-08-27T18:46:28Z","updated_at":"2016-10-09T04:36:28Z","closed_at":"2016-10-09T04:36:28Z","body":"I am following the example from lib_buffer_unpack.c file but I cannot manage to accomplish the following: how can I get how many bytes where 'parsed' after a successful return of msgpack_unpacker_next(...) ?.\r\n\r\nLooking at definition of _struct msgpack\\_unpacker_ the _parsed_ field make sense but it's always set to zero after msgpack_unpacker_next(...) returns with MSGPACK_UNPACK_SUCCESS. I found only a workaround to adding a new field into the structure to keep a persistent _parsed_ values but I am sure it should exists a better way to do it.\r\n\r\nuse case: upon multiple MSGPACK_UNPACK_SUCCESS for a given buffer, I need to summarized the real bytes used/consumed so I can perform some buffer adjustment in the caller (data is coming from TCP). e.g: incoming buffer have 100 bytes, but only the first 80 are a complete message.\r\n\r\nis there a better way to do this ?"}}
{"actor":{"display_login":"redboltz"}}