refactoring udp discovery sequence
minor refinements