NetworkDiscovererMulticast Method (DiscoveryHandler, Int32, Int32)
|
Sends a multicast discovery packet.
Namespace:
Zebra.Sdk.Printer.Discovery
Assembly:
SdkApi_Core (in SdkApi_Core.dll) Version: 2.14.1869
Syntax public static void Multicast(
DiscoveryHandler discoveryHandler,
int hops,
int waitForResponsesTimeout
)
Public Shared Sub Multicast (
discoveryHandler As DiscoveryHandler,
hops As Integer,
waitForResponsesTimeout As Integer
)
public:
static void Multicast(
DiscoveryHandler^ discoveryHandler,
int hops,
int waitForResponsesTimeout
)
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). - hops
- Type: SystemInt32
The number of hops. - waitForResponsesTimeout
- Type: SystemInt32
Time to wait, in milliseconds, before determining that there are no more discovery responses.
Exceptions Remarks
This method will wait up to
waitForResponsesTimeout milliseconds determining that there are no more discovery responses.
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.
For Android users : some extra code is required to obtain a multicast lock. See the example in
Multicast(DiscoveryHandler, Int32, Int32)See Also