KMatle Expert Licensed User Longtime User Apr 28, 2021 #1 I'm playing with B4J and B4R sending/receiving UDP-packets. As it seems, in B4J own packets are received, too. In B4R not. Are these filtered automatically?
I'm playing with B4J and B4R sending/receiving UDP-packets. As it seems, in B4J own packets are received, too. In B4R not. Are these filtered automatically?
Erel B4X founder Staff member Licensed User Longtime User Apr 28, 2021 #2 Are you sending the packets to the broadcast address? Upvote 0
KMatle Expert Licensed User Longtime User Apr 28, 2021 #3 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: Copy 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 Click to expand... B4X: Copy Dim up As UDPPacket up.Initialize(AES_Encrypt("B4JEncrypted","Secret"),"192.168.178.255",51042) usocket.Send(up) In B4R: B4X: Copy 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
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: Copy 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 Click to expand... B4X: Copy Dim up As UDPPacket up.Initialize(AES_Encrypt("B4JEncrypted","Secret"),"192.168.178.255",51042) usocket.Send(up) In B4R: B4X: Copy 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
Erel B4X founder Staff member Licensed User Longtime User Apr 28, 2021 #4 I don't think that anything is filtered. It depends on the router behavior. Better to expect such messages and ignore them. Upvote 0
I don't think that anything is filtered. It depends on the router behavior. Better to expect such messages and ignore them.