Type Definition web_socket::client::WS

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

Unencrypted WebSocket client.

Implementations§

source§

impl WS

source

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

establishe a 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 connection with headers