Closed gterzian closed 1 year ago
@alexjg Ready for review (why is Orion's handle not showing up here?)
Regarding the business logic, these are more proposals obviously, but the TCP example and 'one adapter per connected remote" stuff opened-up some interesting ideas about how to start syncing with a remote without passing document Id's out of band. So this is a first pass at addressing those issues as well.
cargo run --example tcp-example -- --run-ip 0.0.0.0:3001 --other-ip 0.0.0.0:3000
cargo run --example tcp-example -- --run-ip 0.0.0.0:3000 --other-ip 0.0.0.0:3001
This should be in the readme
cargo run --example tcp-example -- --run-ip 0.0.0.0:3001 --other-ip 0.0.0.0:3000
cargo run --example tcp-example -- --run-ip 0.0.0.0:3000 --other-ip 0.0.0.0:3001
This should be in the readme
done
Merging this because some of the stuff is needed to look into storage(such as bootstrapping a document when we receive a sync message about it but we don't have it yet and we could ask storage), while looking further into https://github.com/automerge/spanreed/pull/9
How to run the tcp example:
in two separate terminal windows:
cargo run --example tcp-example -- --run-ip 0.0.0.0:3001 --other-ip 0.0.0.0:3000
cargo run --example tcp-example -- --run-ip 0.0.0.0:3000 --other-ip 0.0.0.0:3001
And then press ctr-c. A successful run prints out "Stopped".