pub fn write_control_message<W: Write>( writer: &mut W, msg: &impl Serialize, ) -> Result<()>
Write a JSON control message to a writer