pub fn watch(&self, request: String, sender: MpscSender<String>) -> Result<(), ()> {
        let url = self.url.clone();

        info!("[WorkerApi Direct]: Sending request: {:?}", request);
        thread::spawn(move || {
            match connect(url, |out| DirectWsClient {
                out,
                request: request.clone(),
                result: sender.clone(),
                do_watch: true,
            }) {
                Ok(c) => c,
                Err(_) => {
                    error!("Could not connect to direct invoation server");
                }
            }
        });
        Ok(())
    }
/// server connection with more than one response
server connection with more than one response
server connection with more than one response
pub fn watch(&self, request: String, sender: MpscSender<String>) -> Result<(), ()> {
        let url = self.url.clone();
        info!("[WorkerApi Direct]: Sending request: {:?}", request);
        thread::spawn(move || {
            match connect(url, |out| DirectWsClient {
                out,
                request: request.clone(),
                result: sender.clone(),
                do_watch: true,
            }) {
                Ok(c) => c,
                Err(_) => {
                    error!("Could not connect to direct invoation server");
                }
            }
        });
        Ok(())
    }
pub fn watch ( & self , request : String , sender : MpscSender < String > ) -> Result < ( ) , ( ) > { let url = self . url . clone ( ) ; info ! ( " " request ) ; thread :: spawn ( move | | { match connect ( url , | out | DirectWsClient { out , request : request . clone ( ) , result : sender . clone ( ) , do_watch : true , } ) { Ok ( c ) => c , Err ( _ ) => { error ! ( " " ) ; } } } ) ; Ok ( ( ) ) }
server connection with more than one response
server connection with more than one response
&self
request
String
sender
MpscSender<String>
&self
request
String
sender
MpscSender<String>