Page MenuHomePhabricator

[Tunnelbroker] Encapsulate message handling with Session object
ClosedPublic

Authored by jon on May 9 2023, 11:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 2:39 PM
Unknown Object (File)
Oct 27 2024, 3:07 AM
Unknown Object (File)
Oct 17 2024, 8:53 AM
Unknown Object (File)
Oct 14 2024, 9:43 PM
Unknown Object (File)
Oct 12 2024, 3:27 PM
Unknown Object (File)
Oct 4 2024, 7:20 PM
Unknown Object (File)
Oct 4 2024, 5:39 PM
Unknown Object (File)
Oct 4 2024, 3:43 PM
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