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)
Sat, Feb 10, 8:21 AM
Unknown Object (File)
Sat, Feb 10, 8:20 AM
Unknown Object (File)
Sat, Feb 10, 8:20 AM
Unknown Object (File)
Sat, Feb 10, 8:12 AM
Unknown Object (File)
Sat, Feb 10, 7:56 AM
Unknown Object (File)
Jan 10 2024, 12:23 PM
Unknown Object (File)
Dec 17 2023, 4:32 AM
Unknown Object (File)
Dec 17 2023, 12:16 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