discovery method
Implementation
@override
Future<List> discovery(String type, int timeout) async {
try {
return await discoveryLoop(type, timeout).timeout(
Duration(seconds: timeout), // กำหนด Timeout 5 นาที
onTimeout: () {
throw TimeoutException("Method timed out after 5 minutes.");
},
);
} on TimeoutException catch (e) {
return [];
} catch (e) {
return [];
}
}