Hi to all
I have a question in reference to receive a bytes over UDP.
Im testing with an aplication in VB6 for to send the data.
I receive the data in B4A with the next code
Sub UDP_PacketArrived (Packet As UDPPacket)
Dim msg As String
Dim Buffer1() As Byte
msg = BytesToString(Packet.data, Packet.Offset, Packet.Length, "UTF8")
Buffer1=msg.GetBytes("UTF8")
I'm sendig data from VB6 with the next code
WinsockTX.SendData (Chr(1) & Chr(2) & Chr(255))
The problem is when i send a char > to 127, in Buffer1 i'm receiving 3 negative values that representing the 128 to 255 values (i'm expecting to receive 1 negative value). This negative values are the same from 128 to 255.
Values from 0 to 127 is OK
Buffer1 = [0=1, 1=2, 2=127]
Values from 128 to 255 Fail
Buffer1 = [0=1, 1=2, 2=-17, 3=-65, 4=-67]
How can i do to receive 1 negative value for next can be transform?
I read several treads respect to that, but im confused with the three negative values..
Thanks