Type Definition web_socket::client::WS
source · pub type WS = WebSocket<CLIENT, BufReader<TcpStream>>;Expand description
Unencrypted WebSocket client.
Implementations§
source§impl WS
impl WS
sourcepub async fn connect<A>(addr: A, path: impl AsRef<str>) -> Result<Self>where
A: ToSocketAddrs + Display,
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.
sourcepub async fn connect_with_headers(
addr: impl ToSocketAddrs + Display,
path: impl AsRef<str>,
headers: impl IntoIterator<Item = impl Header>
) -> Result<Self>
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