-
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.
refactor!: move
Endpoint::send_*
to Connection
`Endpoint::send_message[_with]` methods would open a connection if one doesn't exist, then send a message (over a unidirectional stream). These methods have been removed from `Endpoint`, and corresponding methods (`send[_with]`) have been added to `Connection`. This is another step towards having callers manage their own connections, so that we can remove the `ConnectionPool`. For now, callers can be updated trivially by chaining `Endpoint::connect_to` (which will look in the pool or create a new connection, and return it) and `Connection::send`, e.g. endpoint.connect_to(&addr).await?; endpoint.send_message(msg, &addr, 0).await? Becomes: endpoint .connect_to(&addr) .await? .send(msg) .await? BREAKING CHANGE: `Endpoint::send_message` and `Endpoint::send_message_with` have been removed. Use `Endpoint::connect_to` in combination with `Connection::send` or `Connection::send_with` instead.
- Loading branch information
Showing
5 changed files
with
113 additions
and
116 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
Oops, something went wrong.