This adds an event that is called when a bridge is found.
My use case is the following: I want to use the SsdpBridgeLocator.
I only have one bridge in use, so that as a result, this one is enough for me.
But with the current implementation, I have to wait all the time I have specified in the timeout, even though the bridge may already have been found.
With the event I can implement the following to speed things up:
var locator = new SsdpBridgeLocator();
var cancelSource = new CancellationTokenSource(TimeSpan.FromSeconds(5));
locator.BridgeFound += (s, b) =>
{
cancelSource.Cancel();
};
var bridges = (await locator.LocateBridgesAsync(cancelSource.Token));
This adds an event that is called when a bridge is found.
My use case is the following: I want to use the
SsdpBridgeLocator
. I only have one bridge in use, so that as a result, this one is enough for me. But with the current implementation, I have to wait all the time I have specified in the timeout, even though the bridge may already have been found.With the event I can implement the following to speed things up: