Page MenuHomePhabricator

[Tunnelbroker] Encapsulate message handling with Session object

Authored by jon on Tue, May 9, 11:57 PM.
Referenced Files
Unknown Object (File)
Fri, Jun 2, 7:51 AM
Unknown Object (File)
Sat, May 27, 12:26 AM
Unknown Object (File)
Fri, May 26, 3:34 AM
Unknown Object (File)
Thu, May 25, 1:41 AM
Unknown Object (File)
Mon, May 22, 11:39 AM



It's convenient to hold on to information about the
connected device in some way. This is a minor refactor to
move that context into it's own object.

Part of:

Test Plan
nix develop

(cd services/tunnelbroker && RUST_LOG=debug cargo run &)
cd services/commtest && cargo test --test tunnelbroker_integration_test

Diff Detail

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

jon requested review of this revision.Wed, May 10, 12:15 AM
bartek added inline comments.
7 ↗(On Diff #26319)

Nit: Is there a reason why you have a fully qualified name here? Can't we e.g. use tokio::sync::mpsc; and then call it mpsc::UnboundedSender?
Also I think you can just use String

This revision is now accepted and ready to land.Wed, May 10, 1:19 AM
jon marked an inline comment as done.Fri, May 12, 4:29 PM
jon added inline comments.
7 ↗(On Diff #26319)

Think I just copied the signature from an error output, but you're right. Should make this more human-readable.

7 ↗(On Diff #26319)

Tackled this in D7800, when I polished a lot of this session code.

jon marked an inline comment as done.

Rebase on master