We don't rely on specific websocket stream type, so this can be made generic.
This will be used in the next diff, where we will change TcpStream to a different type.
Depends on D9155
Paths
| Differential D9156 Authored by bartek on Sep 12 2023, 1:47 PM.
Details Summary We don't rely on specific websocket stream type, so this can be made generic. Depends on D9155 Test Plan Tunnelbroker still builds, integration tests pass.
Diff Detail
Event Timelinebartek held this revision as a draft. Herald added a reviewer: • jon. · View Herald TranscriptSep 12 2023, 1:47 PM2023-09-12 13:47:54 (UTC-7) Harbormaster completed remote builds in B22544: Diff 30990.Sep 12 2023, 2:10 PM2023-09-12 14:10:32 (UTC-7) Comment Actions Is generic-ness of this is going to be helpful in the future? Or is it going to be always HyperWebsocket under the hood? Because in that case we should just remove the generics and use HyperWebsocket directly Comment Actions
It's not HyperWebsocket but rather a type gathered from hyper_websocket.await.split(). Alternatively, we could simply hardcode WebSocketStream<Upgraded> which is the exact type returned by this fn, but I'm not a fan because such hardcoding is the reason I had to do this change. Perhaps we can do better, but refactoring is not my goal here. This revision is now accepted and ready to land.Sep 13 2023, 5:44 AM2023-09-13 05:44:41 (UTC-7) Closed by commit rCOMMc6850660a189: [tunnelbroker] Make WebSocketSession generic (authored by bartek). · Explain WhySep 14 2023, 12:46 AM2023-09-14 00:46:31 (UTC-7) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 30990 services/tunnelbroker/src/websockets/mod.rs
services/tunnelbroker/src/websockets/session.rs
|