UDP broadcasting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

in UDP broadcasting, how do i know from which client was the message sent to
the server? is there a way to know this without having to place the IP of the
sender in the message itself? Thank you so much in advance!
 
Rain said:
in UDP broadcasting, how do i know from which client was the message sent
to
the server? is there a way to know this without having to place the IP of
the
sender in the message itself? Thank you so much in advance!

Yes...when the UDP datagram is received, you use a "ReceiveFrom" method,
which returns the endpoint address for the sender.

The sender may or may not even know its actual IP address, so including the
sender's address in the datagram isn't a very reliable method anyway. It is
much better for the receipient to inspect the address as reported to it from
the receiving method.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top