Discovery Router Service
This sample demonstrates how to forward discovery messages to another endpoint.
Discovery routing is useful in a scenario in which a client is looking for a service using a proxy and the proxy is unaware of such a service, but knows of another proxy. This proxy can forward the discovery packet from this client to the second proxy. The second proxy can look for the service and return the responses to the original client.
In this sample, a client sends a message to a discovery routing component. This message is sent to a specific endpoint on the discovery router. The router then forwards the message to a UDP multicast endpoint. The probe message goes out to the multicast endpoint and a service listening on a UDP multicast address responds to that discovery router. The discovery router collects the responses and sends them back to the client.
To set up, build, and run the sample
Build the sample.
Run the DiscoveryRouter executable.
Run the service executable from the build directory.
Run the client executable. Note that the client locates the service.
The samples may already be installed on your machine. Check for the following (default) directory before continuing.
If this directory does not exist, go to Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4 to download all Windows Communication Foundation (WCF) and WF samples. This sample is located in the following directory.