ZSDK_API  1.4.957
 All Classes Functions Enumerations Enumerator Properties Pages
NetworkDiscoverer Class Reference

A class used to discover printers on an IP network. More...

#import <NetworkDiscoverer.h>

Inheritance diagram for NetworkDiscoverer:

Class Methods

(NSArray *) + multicastWithHops:error:
 Sends a multicast discovery packet to each adapter's subnet.
 
(NSArray *) + multicastWithHops:andWaitForResponsesTimeout:error:
 Sends a multicast discovery packet to each adapter's subnet.
 
(NSArray *) + subnetSearchWithRange:error:
 Sends a discovery packet to the IPs specified in the subnetRange.
 
(NSArray *) + subnetSearchWithRange:andWaitForResponsesTimeout:error:
 Sends a discovery packet to the IPs specified in the subnetRange.
 
(NSArray *) + directedBroadcastWithIpAddress:error:
 Sends a directed broadcast discovery packet to the subnet specified by ipAddress.
 
(NSArray *) + directedBroadcastWithIpAddress:andWaitForResponsesTimeout:error:
 Sends a directed broadcast discovery packet to the subnet specified by ipAddress.
 
(NSArray *) + localBroadcast:
 Sends a local broadcast discovery packet to each adapter's subnet.
 
(NSArray *) + localBroadcastWithTimeout:error:
 Sends a local broadcast discovery packet to each adapter's subnet.
 

Detailed Description

A class used to discover printers on an IP network.

Method Documentation

+ (NSArray *) directedBroadcastWithIpAddress: (NSString *)  ipAddress
andWaitForResponsesTimeout: (NSInteger)  waitForResponsesTimeout
error: (NSError **)  error 

Sends a directed broadcast discovery packet to the subnet specified by ipAddress.

This method will wait up to waitForResponsesTimeout milliseconds before determining that there are no more discovery responses. If waitForResponsesTimeout is less than 0 it will be set to the default timeout. Directed broadcasts are defined by the first three subnet octets, followed by 255, such as 192.168.2.255.
This method accepts IP addresses of the form, assuming a subnet of 192.168.2:

  • 192.168.2.255
  • 192.168.2.1 (last octect will be replaced with 255)
  • 192.168.2 (will append 255 for the last octect)
  • 192.168.2. (will append 255 for the last octect)
    Remarks
    Directed broadcasts are defined by the first three subnet octets, followed by 255, such as 192.168.2.255.
    Parameters
    ipAddressThe IP address of the subnet.
    waitForResponsesTimeoutTime to wait, in milliseconds, before determining that there are no more discovery responses.
    errorWill be set to the error that occured.
    Returns
    An array of DiscoveredPrinter objects.
+ (NSArray *) directedBroadcastWithIpAddress: (NSString *)  ipAddress
error: (NSError **)  error 

Sends a directed broadcast discovery packet to the subnet specified by ipAddress.

Directed broadcasts are defined by the first three subnet octets, followed by 255, such as 192.168.2.255.
This method accepts IP addresses of the form, assuming a subnet of 192.168.2:

  • 192.168.2.255
  • 192.168.2.1 (last octect will be replaced with 255)
  • 192.168.2 (will append 255 for the last octect)
  • 192.168.2. (will append 255 for the last octect)
    Remarks
    Directed broadcasts are defined by the first three subnet octets, followed by 255, such as 192.168.2.255.
    Parameters
    ipAddressThe IP address of the subnet.
    errorWill be set to the error that occured.
    Returns
    An array of DiscoveredPrinter objects.
+ (NSArray *) localBroadcast: (NSError **)  error

Sends a local broadcast discovery packet to each adapter's subnet.

Parameters
errornil if there is no error or a description of the error if one occurs.
Returns
An array of DiscoveredPrinter objects.
+ (NSArray *) localBroadcastWithTimeout: (NSInteger)  waitForResponsesTimeout
error: (NSError **)  error 

Sends a local broadcast discovery packet to each adapter's subnet.

This method will wait up to waitForResponsesTimeout milliseconds before determining that there are no more discovery responses. If waitForResponsesTimeout is less than 0 it will be set to the default timeout.

Parameters
waitForResponsesTimeoutTime to wait, in milliseconds, before determining that there are no more discovery responses.
errorWill be set to the error that occured.
Returns
An array of DiscoveredPrinter objects.
+ (NSArray *) multicastWithHops: (NSInteger)  hops
andWaitForResponsesTimeout: (NSInteger)  waitForResponsesTimeout
error: (NSError **)  error 

Sends a multicast discovery packet to each adapter's subnet.

This method will wait up to waitForResponsesTimeout milliseconds before determining that there are no more discovery responses. If waitForResponsesTimeout is less than 0 it will be set to the default timeout.

Parameters
hopsNumber of hops.
waitForResponsesTimeoutTime to wait, in milliseconds, before determining that there are no more discovery responses.
errorWill be set to the error that occured.
Returns
An array of DiscoveredPrinter objects.
+ (NSArray *) multicastWithHops: (NSInteger)  hops
error: (NSError **)  error 

Sends a multicast discovery packet to each adapter's subnet.

Parameters
hopsNumber of hops.
errorWill be set to the error that occured.
Returns
An array of DiscoveredPrinter objects.
+ (NSArray *) subnetSearchWithRange: (NSString *)  subnetRange
andWaitForResponsesTimeout: (NSInteger)  waitForResponsesTimeout
error: (NSError **)  error 

Sends a discovery packet to the IPs specified in the subnetRange.

This method will wait up to waitForResponsesTimeout milliseconds before determining that there are no more discovery responses. If waitForResponsesTimeout is less than 0 it will be set to the default timeout. 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)
Parameters
subnetRangeThe subnet search range.
waitForResponsesTimeoutTime to wait, in milliseconds, before determining that there are no more discovery responses.
errorWill be set to the error that occured.
Returns
An array of DiscoveredPrinter objects.
+ (NSArray *) subnetSearchWithRange: (NSString *)  subnetRange
error: (NSError **)  error 

Sends a discovery packet to the IPs specified in the subnetRange.

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)
    Parameters
    subnetRangeThe subnet search range.
    errorWill be set to the error that occured.
    Returns
    An array of DiscoveredPrinter objects.

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