finally implement AsyncRead/Write

This commit is contained in:
Toshit Chawda 2024-01-29 19:30:55 -08:00
parent 14ddecf3fd
commit be7d92b4c5
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
4 changed files with 103 additions and 7 deletions

View file

@ -57,9 +57,7 @@ pub trait WebSocketWrite {
) -> impl std::future::Future<Output = Result<(), crate::WispError>>;
}
pub struct LockedWebSocketWrite<S>(Arc<Mutex<S>>)
where
S: WebSocketWrite;
pub struct LockedWebSocketWrite<S>(Arc<Mutex<S>>);
impl<S: WebSocketWrite> LockedWebSocketWrite<S> {
pub fn new(ws: S) -> Self {