public void SetAvailibility(DeviceInfo device, bool availible)
{
if (_currentInfo == null)
{
throw new Exception("Cannot set availibility: No device registered with this UdpClient instance.");
}
if (_currentInfo != device)
{
throw new Exception("Cannot set availibility: Device does not match registered device; register a new device before setting availibility.");
}
if (availible && !_timer.Enabled)
{
BeginBroadcast();
}
else if (!availible)
{
EndBroadcast();
}
}