pub async fn write_frame<W, T>(writer: &mut W, message: &T) -> Result<()>where W: AsyncWrite + Unpin, T: Serialize,
Write one compact JSON-RPC line and flush it to the client.