pub struct WebSocketProxyHandler { /* private fields */ }Implementations§
Source§impl WebSocketProxyHandler
impl WebSocketProxyHandler
pub fn new(proxy_config: ProxyConfig) -> Self
Sourcepub fn is_websocket_upgrade_request(req_header: &RequestHeader) -> bool
pub fn is_websocket_upgrade_request(req_header: &RequestHeader) -> bool
Check if a request should be upgraded to WebSocket
Sourcepub fn find_websocket_route(&self, path: &str) -> Option<&ProxyRoute>
pub fn find_websocket_route(&self, path: &str) -> Option<&ProxyRoute>
Find WebSocket proxy route for a given path
Sourcepub fn select_upstream(&self, upstream_name: &str) -> Result<&UpstreamConfig>
pub fn select_upstream(&self, upstream_name: &str) -> Result<&UpstreamConfig>
Select an upstream server using load balancing
Sourcepub async fn handle_websocket_proxy(
&self,
session: &mut Session,
path: &str,
) -> Result<bool>
pub async fn handle_websocket_proxy( &self, session: &mut Session, path: &str, ) -> Result<bool>
Handle WebSocket proxy connection with full bidirectional relay
Sourcepub async fn relay_websocket_messages(
client_ws: WebSocketStream<MaybeTlsStream<TcpStream>>,
upstream_ws: WebSocketStream<MaybeTlsStream<TcpStream>>,
) -> Result<()>
pub async fn relay_websocket_messages( client_ws: WebSocketStream<MaybeTlsStream<TcpStream>>, upstream_ws: WebSocketStream<MaybeTlsStream<TcpStream>>, ) -> Result<()>
Relay messages between client and upstream WebSocket This function provides the bidirectional message relay capability Note: Currently prepared for future full WebSocket streaming implementation
Auto Trait Implementations§
impl Freeze for WebSocketProxyHandler
impl RefUnwindSafe for WebSocketProxyHandler
impl Send for WebSocketProxyHandler
impl Sync for WebSocketProxyHandler
impl Unpin for WebSocketProxyHandler
impl UnwindSafe for WebSocketProxyHandler
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more