[][src]Function twitchchat::native_tls::connect

pub async fn connect<'_>(config: &'_ UserConfig) -> Result<TlsStream<TcpStream>>

Connect to Twitch using TLS via native_tls. Using the provided UserConfig.

This registers with the connection before returning it.

Example

let user_config = UserConfig::builder().anonymous().build()?;
let mut stream = twitchchat::native_tls::connect(&user_config).await?;