UniPRT SDK v2.0.0.0
 
Loading...
Searching...
No Matches
NetworkDiscover Class Reference

A utility class for discovering printers on the local network. More...

#include <NetworkDiscover.h>

Inheritance diagram for NetworkDiscover:

Class Methods

(NSArray< NSString * > *) + getPrinterList
 Discovers printers on the local network.
 
(NSArray< NSString * > *) + getPrinterListWithBrand:
 Discovers printers of a specific brand on the local network.
 
(NSArray< NSString * > *) + getPrinterListWithBrand:timeout:
 Discovers printers of a specific brand on the local network with a custom timeout.
 

Detailed Description

A utility class for discovering printers on the local network.

This class provides methods to broadcast discovery packets and collect responses from available printers. It can return discovered printer IP addresses filtered by brand or using default discovery.

Method Documentation

◆ getPrinterList

+ (NSArray< NSString * > *) getPrinterList

Discovers printers on the local network.

Broadcasts a discovery packet and returns a list of IP addresses of all discovered printers.

Returns
An array of NSString objects representing printer IP addresses.

◆ getPrinterListWithBrand:

+ (NSArray< NSString * > *) getPrinterListWithBrand: (PrinterBrand) brand

Discovers printers of a specific brand on the local network.

Broadcasts a brand-specific discovery packet and returns a list of IP addresses of printers matching the given brand.

Parameters
brandThe printer brand to filter discovery results.
Returns
An array of NSString objects representing printer IP addresses.

◆ getPrinterListWithBrand:timeout:

+ (NSArray< NSString * > *) getPrinterListWithBrand: (PrinterBrand) brand
timeout: (NSInteger) timeoutMs 

Discovers printers of a specific brand on the local network with a custom timeout.

Broadcasts a brand-specific discovery packet and waits up to the given timeout for responses. Returns a list of discovered printer IP addresses.

Parameters
brandThe printer brand to filter discovery results.
timeoutMsThe maximum time (in milliseconds) to wait for printer responses.
Returns
An array of NSString objects representing printer IP addresses.

The documentation for this class was generated from the following file: