When using Particle Build to flash this sample to the Duo, you'll get a "file not found" message for #include "MDNS.h".
For Particle Build you'd need to import the MDNS library and the include statement would then be #include "MDNS/MDNS.h"
But then you'll get another error message "'class MDNS' has no member called 'setService'".
Changing this to addService(...) the sketch builds.