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

Datagram remote_key getter #122

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

Conversation

dr7ana
Copy link
Collaborator

@dr7ana dr7ana commented Apr 24, 2024

  • Added method to get remote_key from dgram_interface wrapper. In lokinet, this is the upstream RouterID; it is easier to grab it directly from the dgram_interface rather than having to create an std::shared_ptr<connection_interface> every time
  • It would be weird to return a ustring_view like the connection_interface method being called, as the dgram_interface makes no assurances of keeping the underlying connection objects alive
  • Making a copy of the ustring ensures that we are not pointing a view at data that we are not managing

- Added method to get remote_key from dgram_interface wrapper. In lokinet, this is the upstream RouterID; it is easier to grab it directly from the dgram_interface rather than having to create an std::shared_ptr<connection_interface> every time
- It would be weird to return a ustring_view like the connection_interface method being called, as the dgram_interface makes no assurances of keeping the underlying connection objects alive
- Making a copy of the ustring ensures that we are not pointing a view at data that we are not managing
@dr7ana dr7ana requested a review from jagerman April 24, 2024 13:06
@dr7ana dr7ana marked this pull request as draft April 24, 2024 15:21
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

Successfully merging this pull request may close these issues.

1 participant