Host machine: Win7, IP:192.168.0.3
Virtual machine: VMWare, Ubuntu16.04 x64, IP:192.168.0.5, Bcast:192.168.0.255
Gateway both: 192.168.0.1
Broadcasting on segment: 192.168.0.255
UDP_Server: starts a thread calling IdUDPServer's RecvFrom(buf, len, 1000);
UDP_Client: calling IdUDPClient's SendTo(buf, len, '192.168.0.255', 1000);
Case 1: Works fine, both UDP_Server and UDP_Client run on the host machine.
Case 2: Works fine, both UDP_Server and UDP_Client run on the virtual machine.
Case 3: Works fine, UDP_Server run on the virtual machine, UDP_Client run on the host machine.
Case 4: Doesn't Work, UDP_Client run on the virtual machine, UDP_Server run on the host machine.
I test this with another virtual machine, VmWare, Win7x64, IP:192.168.146.6.
VMWare has 2 NICs, btw.
UDP_Client: calling IdUDPClient's SendTo(buf, len, '192.168.146.255', 1000);
All Cases above works fine then.
I have no idea about this, any words would be good.