Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bencode formats #130

Closed
neuroscr opened this issue Dec 11, 2018 · 8 comments
Closed

Bencode formats #130

neuroscr opened this issue Dec 11, 2018 · 8 comments

Comments

@neuroscr
Copy link
Contributor

Missing keys should be FATAL

Extra keys (possible old format that's now deprecated) should be a WARN

@majestrate
Copy link
Contributor

ideally we need to implement seek/discard of entities instead of just hard failing if they are not the expected format.

@majestrate
Copy link
Contributor

idea, have llarp::IBEncodeMessage have a member for unrecondised values

@majestrate
Copy link
Contributor

specifically a std::unordered_map<std::string, llarp_buffer_t> where key is the key name and value is a buffer containing its value.

@majestrate
Copy link
Contributor

or.... potentially pass into llarp::IBEncodeMessage::BDecode a std::unordered_map<std::string, llarp_buffer_t> & to place in unknown fields.

@neuroscr
Copy link
Contributor Author

neuroscr commented Jan 7, 2019

why would we need to store fields we don't know or can't do anything with in memory? Seems just like a waste of memory.

@majestrate
Copy link
Contributor

it's not, it's a llarp_buffer_t which is a pointer to a region of memory, it doesn't copy it.

@majestrate
Copy link
Contributor

oh, right, it's for older version to not die when parsing newer messages

@neuroscr
Copy link
Contributor Author

neuroscr commented Sep 5, 2019

closing because no one cares any more

@neuroscr neuroscr closed this as completed Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants