How can I send a multicast ping in .NET ? So that all computers 开发者_StackOverflowon the network respond ?
Assuming you mean "broadcast ping" (I get the two confused All The Time, myself):
Fetch the local network gateway IP, change the last byte to 255, ping that IP.
The main problem with your approach though is that the set of all devices on the network that will respond to a broadcast ping is typically much smaller than the set of all devices on the network. I've found that while most devices will respond to a direct ping, very few will respond to a broadcast ping. It's implementation dependant.
精彩评论