{"action":"closed","issue":{"url":"https://api.github.com/repos/private-octopus/picoquic/issues/212","repository_url":"https://api.github.com/repos/private-octopus/picoquic","labels_url":"https://api.github.com/repos/private-octopus/picoquic/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/private-octopus/picoquic/issues/212/comments","events_url":"https://api.github.com/repos/private-octopus/picoquic/issues/212/events","html_url":"https://github.com/private-octopus/picoquic/issues/212","id":335657263,"node_id":"MDU6SXNzdWUzMzU2NTcyNjM=","number":212,"title":"Refactoring frame skip and decode function interfaces","user":{"login":"igorlord","id":25256216,"node_id":"MDQ6VXNlcjI1MjU2MjE2","avatar_url":"https://avatars0.githubusercontent.com/u/25256216?v=4","gravatar_id":"","url":"https://api.github.com/users/igorlord","html_url":"https://github.com/igorlord","followers_url":"https://api.github.com/users/igorlord/followers","following_url":"https://api.github.com/users/igorlord/following{/other_user}","gists_url":"https://api.github.com/users/igorlord/gists{/gist_id}","starred_url":"https://api.github.com/users/igorlord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorlord/subscriptions","organizations_url":"https://api.github.com/users/igorlord/orgs","repos_url":"https://api.github.com/users/igorlord/repos","events_url":"https://api.github.com/users/igorlord/events{/privacy}","received_events_url":"https://api.github.com/users/igorlord/received_events","type":"User","site_admin":false},"labels":[{"id":818622514,"node_id":"MDU6TGFiZWw4MTg2MjI1MTQ=","url":"https://api.github.com/repos/private-octopus/picoquic/labels/code%20quality","name":"code quality","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-26T04:43:41Z","updated_at":"2018-07-15T17:52:09Z","closed_at":"2018-07-15T17:52:09Z","author_association":"COLLABORATOR","body":"As stated in #199, the current interface to frame skip and decode functions makes the code too verbose.  We have options.\r\n\r\nThe proposed interface #199 (see below) was deemed too complex.\r\n```\r\nerr <- skip_fn(uint8_t** pbytes, uint8_t* max_bytes)\r\nerr <- decode_fn(picoquic_cnx_t* cnx, uint8_t** pbytes, uint8_t* max_bytes)\r\n```\r\n\r\nHere is another proposal that is also concise.  Here, we return new bytes.  Errors are indicated by return of NULL (no separate error code).  Besides being concise, it ensures that processing will NOT continue after a failure.\r\n```\r\nuint8_t* <- skip_fn(uint8_t* bytes, uint8_t* max_bytes)\r\nuint8_t* <- decode_fn(picoquic_cnx_t* cnx, uint8_t* bytes, uint8_t* max_bytes)\r\n```\r\n\r\nI'd appreciate feedback before I go ahead and create a PR to change a bunch of code."}}
{"actor":{"display_login":"igorlord"}}