Your question, your audience. Choose who sees your identity—and your question—with question security.
int main( int argc, const char* argv[] )
{
SendTextViaUdpBroadcast("EXAMPLE_TEXT_TO_BE_SENT");
}
void SendTextViaUdpBroadcast ( TextIn )
{
// Here the contents of TextIn are send as ascii in a udp packet as a broadcast (to ip 255.255.255.255)
}
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
set to true. Once you do that, you want to send your request to the IP
address of 255.255.255.255. From the documentation for the EnableBroadcast
property on the UdpClient class:
Broadcasting is limited to a specific subnet. You can broadcast to your
local subnet by sending a packet to 255.255.255.255; or, you can use the
directed broadcast address, which is the network portion of an Internet
Protocol (IP) address with all bits set in the host portion. For example, if
your IP address is 192.168.1.40 (a Class C address, with the network portion
as the first three octets, and the host portion is the last octet), your
directed broadcast address is 192.168.1.255.