diff --git a/CHANGELOG.md b/CHANGELOG.md index b8180c2..fe5b80d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,16 @@ ## Unreleased -- `TcpDialer` now simply takes a `Url` parameter, rather than a host and a port or a socket address. -- Added a convenience `repo.dial_tcp()` method to simplify construction of `TcpDialer`. -- Allow documents syncing over the TCP transport to be up to 8gb size instead of Tokio's default 8mb frame size -- Exposed receiving `ConnectionHandle`s via `accept()`. Users can now subscribe to an `events()` stream directly - on the handle, or `await` for `handshake_completed()`. +### Added + +- `TcpDialer::new` which takes a `Url` parameter, rather than a host and a port + or a socket address. +- `Repo::dial_tcp()` to simplify construction of `TcpDialer`. +- Allow documents syncing over the TCP transport to be up to 8gb size instead + of Tokio's default 8mb frame size +- Exposed receiving `ConnectionHandle`s via `accept()`. Users can now subscribe + to an `events()` stream directly on the handle, or `await` for + `handshake_completed()`. ## 0.8.0 - 2024-03-06 diff --git a/samod/src/tokio_io.rs b/samod/src/tokio_io.rs index 001e472..34364f9 100644 --- a/samod/src/tokio_io.rs +++ b/samod/src/tokio_io.rs @@ -72,6 +72,10 @@ impl std::fmt::Debug for TcpDialerError { impl std::error::Error for TcpDialerError {} impl TcpDialer { + pub fn new_host_port(host: String, port: u16) -> Self { + Self { host, port } + } + /// Create a dialer which will resolve the given [`Url`]. /// The [`Url`] must have the scheme `tcp://`, and must have a valid [`Url::host`] and [`Url::port`]. pub fn new(url: Url) -> Result {