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
Differential D9156
[tunnelbroker] Make WebSocketSession generic bartek on Sep 12 2023, 1:47 PM. Authored by Tags None Referenced Files
Details We don't rely on specific websocket stream type, so this can be made generic. Depends on D9155 Tunnelbroker still builds, integration tests pass.
Diff Detail
Event Timeline
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. |