printer discovery in print service
This commit is contained in:
@@ -3,7 +3,7 @@ using System.Net.Sockets;
|
||||
|
||||
namespace Inspectron.Epson;
|
||||
|
||||
public class ENPCDiscoveryService
|
||||
public class DiscoveryService : IDiscoveryService
|
||||
{
|
||||
private const int DiscoveryPort = 3289;
|
||||
private const string DiscoveryMessage = "EPSONQ";
|
||||
17
Inspectron.Epson/IDiscoveryService.cs
Normal file
17
Inspectron.Epson/IDiscoveryService.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace Inspectron.Epson;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for ENPC printer discovery service
|
||||
/// </summary>
|
||||
public interface IDiscoveryService
|
||||
{
|
||||
/// <summary>
|
||||
/// Discovers Epson printers on the local network using UDP broadcast
|
||||
/// </summary>
|
||||
/// <param name="timeout">How long to wait for responses (default: 5 seconds)</param>
|
||||
/// <param name="onPrinterDiscovered">Optional callback invoked when a printer is discovered</param>
|
||||
/// <returns>List of discovered printer information</returns>
|
||||
Task<List<DiscoveredPrinter>> DiscoverPrintersAsync(
|
||||
TimeSpan? timeout = null,
|
||||
Action<DiscoveredPrinter>? onPrinterDiscovered = null);
|
||||
}
|
||||
Reference in New Issue
Block a user