Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UDP broadcast message fails
#8
(07-20-2019, 08:09 PM)Boba TC Wrote: I guess no attachments are allowed.

They should be.  Images and such have been posted in this forum before.  I don't have admin access to the forum settings, so I don't know if there are any restrictions set, though.

(07-20-2019, 08:09 PM)Boba TC Wrote: Basically, wire shark was reporting an exception due to a malformed packet: the second frame had unacceptably high length.
Now, with explicit binding to the default broadcast address, the shark is happy and I can see the message text on the wire.

You can't bind a socket to a broadcast IP, since that IP does not belong to the local machine.  You can only bind to a local IP for the network adapter that is connected to the subnet which the broadcast IP belongs to.

(07-20-2019, 08:09 PM)Boba TC Wrote: how do I catch this message on my LAN? I create another application (would be called a server side) with TIdUDPServer component and I bind it to that same address and port.

Again, you can only bind to a local IP, not to a broadcast IP.  However, if the TIdUDPServer is bound to a network adapter that is connected to the subnet being broadcasted to, then it should receive the broadcast messages just fine, you don't need to do anything extra for that.

Also, if the broadcasting client and receiving server are running on the same machine, do not bind them to the same local IP : Port.  In faact, you should not be binding the client's Port at all, unless your network router requires broadcasts to come from a specific port.

(07-20-2019, 08:09 PM)Boba TC Wrote: The applications reports an exception on start-up saying 'Could not bind socket. Address and port are already in use'.

Then you are trying to bind your server to something you can't bind it to.

Reply


Messages In This Thread
UDP broadcast message fails - by Boba TC - 07-18-2019, 03:49 AM
RE: UDP broadcast message fails - by Boba TC - 07-18-2019, 05:51 PM
RE: UDP broadcast message fails - by rlebeau - 07-18-2019, 10:22 PM
RE: UDP broadcast message fails - by Boba TC - 07-19-2019, 02:26 AM
RE: UDP broadcast message fails - by rlebeau - 07-19-2019, 09:55 PM
RE: UDP broadcast message fails - by Boba TC - 07-20-2019, 02:08 AM
RE: UDP broadcast message fails - by Boba TC - 08-17-2019, 04:35 AM
RE: UDP broadcast message fails - by rlebeau - 08-17-2019, 07:22 AM
RE: UDP broadcast message fails - by Boba TC - 07-20-2019, 08:09 PM
RE: UDP broadcast message fails - by rlebeau - 07-23-2019, 09:35 PM
RE: UDP broadcast message fails - by Boba TC - 08-22-2019, 12:53 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)