Encapsulate a separate thread that listens for incoming messages from other servers in the class, says MyCustomService.
Write a WCF service. Implementation class with behavior like concurrencyMode multiple and InstanceContextMode Single
Record the delagate event inside the WCF service implementation class. The delegate will return the class type MyCustomService.
When you programmatically create a WCF service (host.Open), first set the delegate to a function that will return an instance of MyCustomService, which can be single-point or static.
In a service instance class, you can always call a delegate to get an instance of MyCustomService. Check the zero value.
source share