NetworkDiscovererSubnetSearch Method (DiscoveryHandler, String)
|
Sends a discovery packet to the IPs specified in the subnetRange.
Namespace:
Zebra.Sdk.Printer.Discovery
Assembly:
SdkApi_Core (in SdkApi_Core.dll) Version: 2.13.898
Syntax public static void SubnetSearch(
DiscoveryHandler discoveryHandler,
string subnetRange
)
Public Shared Sub SubnetSearch (
discoveryHandler As DiscoveryHandler,
subnetRange As String
)
public:
static void SubnetSearch(
DiscoveryHandler^ discoveryHandler,
String^ subnetRange
)
Parameters
- discoveryHandler
- Type: Zebra.Sdk.Printer.DiscoveryDiscoveryHandler
A DiscoveryHandler instance that is used to handle discovery events (e.g. found a printer, errors, discovery finished). - subnetRange
- Type: SystemString
The subnet search range.
Exceptions Remarks
Subnet searches are defined by the first three subnet octets, followed by a range, such as 192.168.2. This method accepts IP addresses of the form,
assuming a subnet of 192.168.2:
- 192.168.2.254 (will send a discovery packet to 192.168.2.254)
- 192.168.2.* (will send a discovery packet for the range 192.168.2.1 - 192.168.2.254)
- 192.168.2.8-* (will send a discovery packet for the range 192.168.2.8 - 192.168.2.254)
- 192.168.2.37-42 (will send a discovery packet for the range 192.168.2.37 - 192.168.2.42)
This method will invoke the
FoundPrinter(DiscoveredPrinter) method for each printer that is found during discovery.
DiscoveryFinished will be invoked when the discovery is finished and
DiscoveryError(String)
will be invoked when any errors are encountered during discovery. When
DiscoveryError(String) is invoked, the discovery
will be canceled and
DiscoveryFinished will not be invoked.
If a printer responds to the discovery request more than once, the
FoundPrinter(DiscoveredPrinter) method will only be invoked
on the first occurrence.
See Also