It's called full duplex. This is easily achievable with WCF duplex. The service can be a WCF selfhosting exe program.
https://learn.microsoft.com/en-us/dotnet/framework/wcf/feature-details/duplex-services
https://dotnetfalcon.com/duplex-service-over-tcp-with-wcf/
https://www.tutorialspoint.com/wcf/wcf_self_hosting.htm
WCF data exchange default is XML.