Click or drag to resize

ClientAPIDiscoverByPinging Method

Discovers cards on the network by pinging the card's expected IP address based on its serial number, and returns a list of those discovered.

Namespace: RAYLASE.SPICE3.ClientLib
Assembly: RAYLASE.SPICE3.ClientLib (in RAYLASE.SPICE3.ClientLib.dll) Version: 3.4.1
Syntax
C#
public static CardInfo[] DiscoverByPinging(
	int fromSerialNumber,
	int toSerialNumber
)

Parameters

fromSerialNumber  Int32
The serial number where the search should begin from.
toSerialNumber  Int32
The serial number where the search should end.

Return Value

CardInfo
An array of discovered cards.
Remarks

This is an alternative method of discovering cards on private networks, such as peer-to-peer networks, where the UPnP protocol may be disabled or blocked, for instance by a firewall.

The routine calculates the card's assumed private IP address based on its serial number, and then sends a ping to that address. If the ping is answered, a connection is attempted to determine whether the responding network device is a SPICE3 card. If the connection succeeds the IP address is added to the list, and the next serial number is tested until the specified range of serial numbers is exhausted.

The routine tests up to 10 cards in parallel. Depending on the range of cards to be tested, the search may take several seconds to complete - typically about 10 seconds for a range of 50 cards.

See Also