Type Definition web_socket::client::WSS

source ·
pub type WSS = WebSocket<CLIENT, BufReader<TlsStream<TcpStream>>>;
Expand description

Encrypted WebSocket client.

Implementations§

source§

impl WSS

source

pub async fn connect<A>(addr: A, path: impl AsRef<str>) -> Result<Self>where A: ToSocketAddrs + Display,

establishe a secure websocket connection to a remote address.

source

pub async fn connect_with_headers( addr: impl ToSocketAddrs + Display, path: impl AsRef<str>, headers: impl IntoIterator<Item = impl Header> ) -> Result<Self>

establishes a secure connection with headers