/// Creates client connected to device with given address
Creates client connected to device with given address
Creates client connected to device with given address
pub async fn new(config: WebOsClientConfig) -> Result<WebosClient, String> {
        let url = url::Url::parse(&config.address).expect("Could not parse given address");
        let (ws_stream, _) = connect_async(url).await.expect("Failed to connect");
        debug!("WebSocket handshake has been successfully completed");
        let (write, read) = ws_stream.split();
        WebosClient::from_stream_and_sink(read, write, config).await
    }
pub async fn new ( config : WebOsClientConfig ) -> Result < WebosClient , String > { let url = url :: Url :: parse ( & config . address ) . expect ( " " ) ; let ( ws_stream , _ ) = connect_async ( url ) . await . expect ( " " ) ; debug ! ( " " ) ; let ( write , read ) = ws_stream . split ( ) ; WebosClient :: from_stream_and_sink ( read , write , config ) . await }
Creates client connected to device with given address
Creates client connected to device with given address
config
WebOsClientConfig