pub fn write_handshake( stream: &mut impl Write, app_id: &str, workspace_id: Option<&str>, ) -> Result<()>