While developing a C# application I came across this problem, so as to get which user is connected I m using ping() function and sending ping to 255 users in a loop depending upon my own IP address and waiting for the reply!

but my question is We have more that 500 students in our hostels and every one is connected to LAN then how is IP address allocated to each device and how can I retrieve list of all users connected to LAN at a point of time.

I believe I was able to make my question clear!

有帮助吗?

解决方案

This sounds like more of a networking structure issue. When you have 500 people they would have to be segregated into network segments so instead of all the users having the same 192.168.0.XXX. Some devices might have 192.168.0.xxx and others might have 192.168.1.xxx. You would be able to verify this with your network admin.

Boils down to you will probably have to scan more than just one network range.

Good Luck!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top