Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions samod/src/tokio_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self, TcpDialerError> {
Expand Down