So after hours of research i have found 开发者_开发知识库nothing about this question.
Is it possible to see who is connected to my wireless network using C#?
Example: I have 2 Laptops - Laptop A and Laptop B.
A is on running my program I made and connected to my wireless network.
B is starting up and connects to my wireless network. A can now see that B is connected to the wireless network through the program I made.
Is this possible?
Is it possible to see whos connected to my wireless network using C#?
Option 1) depends on what your wireless connection device is (supposing a router or access point) and how programmable it is. For instance, if you have a Linksys WRT54GL, you could load DD-WRT or another OSS firmware and write your own modules to monitor this behavior. Programming that module in C# would require loading the mono libraries into the DD-WRT install.
Option 2) install a "heartbeat monitor" on each machine that could connect to the wireless network. Once the connection to that gateway has been made, the daemon tells other monitors that it is now connected to the network.
Option 1 is best if you have no control over what devices connect. Option 2 is best if you can control what devices connect.
In theory, yes - if your wireless router exposes an API that you can hook into to get the list of currently connected clients, then it's likely that you can write something in C# that will poll the API for changes.
Practically speaking, I'm not aware of any wireless router that actually does what I proposed above. Then again, I've never really looked into it so who knows!
精彩评论