You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have looked for existing issues (including closed) about this
Feature Request
I would like to be able to get the inner WebSocketStream from the WebSocket object.
I prepose a small simple inner() function to be implemented on the WebSocket that Consumes self and get the inner [tokio_tungstenite::WebSocketStream].
/// Return the selected WebSocket subprotocol, if one has been chosen.
pubfnprotocol(&self) -> Option<&HeaderValue>{
self.protocol.as_ref()
}
}
Alternatives
I have looked into implementing this downstream in ws_stream_tungstenite but they need access to the ATungSocket<S> to check the buffer size and then call TungWebSocket::new() If another route forward is viable that i missed Im open to hearing about it and applying it to my needs.
This change would also enable the tlsn to not need to fork the ws.rs file with the changes here
Feature Request
I would like to be able to get the inner
WebSocketStream
from theWebSocket
object.I prepose a small simple
inner()
function to be implemented on theWebSocket
that Consumesself
and get the inner [tokio_tungstenite::WebSocketStream
].Motivation
I would like to use
ws_stream_tungstenite::ws_stream::new()
with this object to use https://github.com/tlsnotary/tlsn/blob/3554db83e17b2e5fc98293b397a2907b7f023496/notary/server/src/service/axum_websocket.rs#L363 to create proofs of tls sessions.Proposal
The feature could be a three line PR with the following logic in the following location. If need be it can be behind a feature flag.
The implementation can go here:
axum/axum/src/extract/ws.rs
Lines 463 to 488 in 5027472
Alternatives
I have looked into implementing this downstream in
ws_stream_tungstenite
but they need access to theATungSocket<S>
to check the buffer size and then callTungWebSocket::new()
If another route forward is viable that i missed Im open to hearing about it and applying it to my needs.This change would also enable the tlsn to not need to fork the ws.rs file with the changes here
https://github.com/tlsnotary/tlsn/blob/3554db83e17b2e5fc98293b397a2907b7f023496/notary/server/src/service/axum_websocket.rs#L363, which would enable closing: tlsnotary/tlsn#541
The text was updated successfully, but these errors were encountered: