How to make broadcasting in C#
I need to know how to make broadcasting in LAN network to know how many host are connected to it.
Is it the right way, or I have to do something else.
Regards...
Is it the right way, or I have to do something else.
Regards...
But what you need is using broadcasting with ICMP. Try understanding what broadcasting is with that link above.
For ICMP, you'll need to send a "PING" to the broadcast IP. Here's a few source codes to write your own PING program.
http://www.dataidee.com/ping/ping.htm
http://www.csharphelp.com/archives/archive6.html
http://www.c-sharpcorner.com/network/ping.asp
If you're using .NET Framework 2.0, there's a Ping utility class at the namespace System.Net.NetworkInformation which you can use. There is also an ICMP class available.
I hope that helps.