pub async fn write_frame<W, P>(writer: &mut W, frame: &Frame<P>) -> Result<()>where W: AsyncWrite + Unpin, P: Serialize,
Write one frame as a single line and flush.