Page MenuHomePhabricator

[Tunnelbroker] Encapsulate message handling with Session object
ClosedPublic

Authored by jon on May 9 2023, 11:57 PM.
Tags
None
Referenced Files
F1569334: D7768.id27023.diff
Thu, Apr 18, 3:18 AM
F1569333: D7768.id26431.diff
Thu, Apr 18, 3:18 AM
F1569332: D7768.id26319.diff
Thu, Apr 18, 3:18 AM
F1569299: D7768.id.diff
Thu, Apr 18, 3:18 AM
F1569276: D7768.diff
Thu, Apr 18, 3:10 AM
Unknown Object (File)
Sat, Apr 13, 8:31 PM
Unknown Object (File)
Fri, Apr 5, 1:49 PM
Unknown Object (File)
Sun, Mar 31, 5:50 AM
Subscribers

Details

Summary

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: https://linear.app/comm/issue/ENG-3822

Test Plan
nix develop

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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek added inline comments.
services/tunnelbroker/src/websockets/session.rs
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.May 10 2023, 1:19 AM
jon added inline comments.
services/tunnelbroker/src/websockets/session.rs
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