I send long value with B4J.
Send value is 1234567890
I recived with B4R. But result is not same
Send value is 1234567890
B4X:
If msg.StartsWith("#TIME#") Then
Dim Port As Int = edBroadcastPort.Text
Packet.Initialize( bc.LongsToBytes(Array As Long(1234567890)), edBroadcastHost.Text, Port)
UDPSocket1.Send(Packet)
Log("send date")
End If
I recived with B4R. But result is not same
B4X:
Sub Udp_PacketArrived (Data() As Byte, Ip() As Byte, Port As UInt)
Log("PacketArrived data:",Data)
Log("PacketArrived port:",Port)
Log("PacketArrived ip:",Ip)
Dim x As String =bc.LongsFromBytes(Data)
Log("Data:",x) 'Data:1073681064
Log("boy:",Data.Length) 'boy:8
Dim ll() As Long=bc.LongsFromBytes(Data)
Log("Data2:",ll.Length,"< - >", ll(0)) 'return ....>> Data2:2< - >0
Log("Data3:",ll.Length,"< - >", ll(1)) 'return ....>> Data2:2< - >-771582391
end if