-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: return
Connection
from Endpoint::connect_*
This is a small step towards removing the `ConnectionPool`. The `ConnectionPool` is used for a number of things, one of which is enabling the `Endpoint` APIs that operate exclusively on `SocketAddr`s, rather than connection handles. This commit exposes the `Connection<I>` type, and updates the `Endpoint::new`, `Endpoint::connect_to`, and `Endpoint::connect_to_any` methods to return `Connection<I>` rather than `SocketAddr`. For now, the only public method on `Connection<I>` is `remote_address`, which callers can then use with the existing (unchanged) `SocketAddr`-based `Endpoint` APIs. Future commits will introduce additional `Connection` methods to replace these `SocketAddr`-based APIs. BREAKING CHANGE: `Endpoint::new`, `Endpoint::connect_to`, and `Endpoint::connect_to_any` now use `Connection<I>` instead of `SocketAddr` in their return type.
- Loading branch information
Showing
5 changed files
with
68 additions
and
51 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