Skip to main content

derive_ws_url

Function derive_ws_url 

Source
pub fn derive_ws_url(base_url: &str, channel: &str) -> String
Expand description

Derives a WebSocket URL for a given channel from a base URL.

Replaces the last path segment (/public, /private, or /business) with the target channel. If no recognized segment is found, appends /{channel} to the path.