There are many similar questions to my question but none of them answers exactly what I need, so I am putting up here the detailed scenario and architecture / layout:
___________
| |
| PC |
| |
|___________|
|
_____|_____
| switch |
|___________|
| | |
____| | |_____> Hanging Cable
| |
| |
Device1 Device2
Device1, Device2 are biometric devices which are connected to PC via switch.
Each device has its MAC address and private IP address.
Now the question is:
Is there any way to determine MAC address or IP address of Device3 when connected to Hanging Cable instantly in C# .NET as shown in figure?
Ping method takes a little time to figure out whether given IP is connected.
I want to determine MAC or IP of the device instantly when it is connected because, I have to synchronize some data with the device and for that I have written a thread which has a loop detecting devices and as soon as device found then it performs synchronization.
If I use Ping to determine connection then the thread takes a more time and the delay is propagated to further devices which are there in loop.
The application at PC has a list of all devices MAC address as well as the private IP address. The only thing PC doesn't know is when a device is going to be connected so as to synchronize data.