checkIdeConnection method
Check if an IDE connection is responding by testing if the port is open.
Implementation
Future<bool> checkIdeConnection(
String host,
int port, {
Duration timeout = const Duration(milliseconds: 500),
}) async {
try {
final socket = await Socket.connect(host, port, timeout: timeout);
socket.destroy();
return true;
} catch (_) {
return false;
}
}