-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(iroh-net)!: Rename Endpoint::my_addr to Endpoint::node_addr (#…
…2362) ## Description This is in line with e.g. Endpoint::node_id. ## Breaking Changes - Endpoint::my_addr -> Endpoint::node_addr ## Notes & open questions Other networking APIs tend to have something like "local_addr", e.g. UdpSocket::local_addr in the standard library or Endpoint::local_addr in Quinn. Sometimes this is because they also have a "peer_addr" version, e.g. UdpSocket::peer_addr. In this light perhaps some of our APIs might benefit from using this for consistency with other API conventions. In this case this would become Endpoint::local_node_addr. We already have Endpoint::local_addr which returns the socket addresses we are bound to. Other candidates would be: - Endpoint::home_relay -> Endpoint::local_home_relay - Endpoint::node_id -> Endpoint::local_node_id - Endpoint::secret_key -> Endpoint::local_secret_key But, you can already see this fall apart. Because our endpoint is not the thing that is connected to a peer (that is the Connection) I don't think it makes sense to use the term "local" in the APIs. And perhaps Endpoint::local_addr should be changed anyway, while it is compatible with other usages it is rather out of tone for us because we have too many kind of addresses (socket address, node address, direct address, ...?). So perhaps that one is better off as Endpoint::bound_sockets or so. ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - ~~[ ] Tests if relevant.~~ - [x] All breaking changes documented.
- Loading branch information
Showing
6 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters