/// Consume the current prompt and dispatch a message to the server
Consume the current prompt and dispatch a message to the server
Consume the current prompt and dispatch a message to the server
pub async fn send<'a, S>(&mut self, line: S)
    where
        S: Into<Cow<'a, str>>,
    {
        self.consume_prompt().await;
        // server requires \r\n to indicate command entry
        let line = line.into();
        let message = format!("{}\r\n", line.as_ref());
        self.req_tx
            .send(TelnetRequest::Send(message))
            .await
            .unwrap();
    }
pub async fn send < ' a , S > ( & mut self , line : S ) where S : Into < Cow < ' a , str > > , { self . consume_prompt ( ) . await ; // server requires \r\n to indicate command entry let line = line . into ( ) ; let message = format ! ( " \r \n " line as_ref ( ) ) ; self . req_tx . send ( TelnetRequest :: Send ( message ) ) . await . unwrap ( ) ; }
Consume the current prompt and dispatch a message to the server
Consume the current prompt and dispatch a message to the server
&mut self
line
S