Page MenuHomePhabricator

[Tunnelbroker] Encapsulate message handling with Session object
ClosedPublic

Authored by jon on May 9 2023, 11:57 PM.
Tags
None
Referenced Files
F1441324: D7768.diff
Fri, Mar 29, 1:19 AM
Unknown Object (File)
Feb 10 2024, 8:21 AM
Unknown Object (File)
Feb 10 2024, 8:20 AM
Unknown Object (File)
Feb 10 2024, 8:20 AM
Unknown Object (File)
Feb 10 2024, 8:12 AM
Unknown Object (File)
Feb 10 2024, 7:56 AM
Unknown Object (File)
Jan 10 2024, 12:23 PM
Unknown Object (File)
Dec 17 2023, 4:32 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
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek added inline comments.
services/tunnelbroker/src/websockets/session.rs
7

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

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

7

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

jon marked an inline comment as done.

Rebase on master