pub async fn connect_with_auth( addr: &str, api_key: &str, ) -> Result<TcpStream, Error>
Attempt to connect to addr, send the api_key followed by a newline, and return the established TcpStream if successful.
addr
api_key
TcpStream