Skip to main content

start_long_lived_tcp

Function start_long_lived_tcp 

Source
pub fn start_long_lived_tcp(
    addr: String,
    api_key: String,
) -> (Receiver<String>, Sender<Command>)
Expand description

Start a background task that maintains a long-lived TCP connection to addr, authenticates with api_key, forwards received lines to the returned mpsc::Receiver<String>, and accepts outgoing Commands via the returned mpsc::Sender<Command>. The task will attempt reconnection on disconnect.