vb6 broadcast to all network interface

Viewed 45

pc >>> virtual machine
pc client.exe | virtual machine running server.exe
pc connects to server.exe no problem then binds the UDP to it so it can send a message.

now that these 2 are connected and broadcast message is being sent pc to virtual every second when I launch a multiplayer game on both pc and virtual machine.
pc can't see the hosted game from a virtual machine why not?

I read online you send UDP broadcast packets but it does not mention what type of packet and what to send so I just used some normal data instead and the hosted game is not being detected.

also, I think this is not sending broadcast to all network interfaces how do I do that

Private Sub Timer1_Timer()
 wss.RemoteHost = "255.255.255.255"   ' Must have remote IP Address
 'ws1.Bind 12345                       ' Must Bind our Local Port Number
 wss.RemotePort = 1234                ' Must have Remote Port Number
 wss.SendData wss.LocalHostName & vbNewLine & wss.LocalIP & vbNewLine & wss.LocalPort & vbNewLine
 Caption = "Client 2: IP = " & wss.LocalIP & ", Port = " & wss.LocalPort
End Sub
0 Answers
Related