using Inspectron.Epson;

Console.WriteLine("Listening for printer responses...\n");

var discoveryService = new PrinterDiscoveryService();

var printers = await discoveryService.DiscoverPrintersAsync(
    timeout: TimeSpan.FromSeconds(5),
    onPrinterDiscovered: printer =>
    {
        Console.WriteLine($"Received {printer.ResponseData.Length} bytes from {printer.IPAddress}");
        Console.WriteLine(printer.GetResponseDataAsHex());
        Console.WriteLine();
    });

Console.WriteLine($"\nDiscovery complete. Found {printers.Count} printer(s).");


