B4R Question UDP: Are own packets filtered automatically?

KMatle

Expert
Licensed User
Longtime User
Yes. No big issue, just wondering as in B4J own packets arrive (as expected as it is broadcasted), in B4R own packets don't arrive, only (wanted) "foreign".

In B4J:
B4X:
usocket.Initialize2("usocket", 51042, 8192, True, False) 'reuse is set to true
'to allow multiple applications to listen to this port
Log($"Broadcast address: ${usocket.GetBroadcastAddress}"$)

which logs
Broadcast address: 192.168.178.255

B4X:
Dim up As UDPPacket
up.Initialize(AES_Encrypt("B4JEncrypted","Secret"),"192.168.178.255",51042)
usocket.Send(up)

In B4R:
B4X:
Sub Process_Globals
Private ip() As Byte = Array As Byte(192, 168, 178, 255)

....

usocket.BeginPacket(ip, port)
Log("Sending packet. ",usocket.Write(mc), " Bytes written...")
usocket.SendPacket
 
Upvote 0
Top