I need to send a "AAAA010000000004000159" via network.
In PPC version I do it in this way:
Client.New1
Client.Connect(IP,30704)
bin.New1(Client.GetStream,False)
...
Dim Byt1(11) As byte 'AAAA010000000004000159
Byt1(0)=170
Byt1(1)=170
Byt1(2)=001
Byt1(3)=000
Byt1(4)=000
Byt1(5)=000
Byt1(6)=000
Byt1(7)=004
Byt1(8)=000
Byt1(9)=001
Byt1(10)=089
bin.WriteBytes(Byt1())
In Android version I tried:
Dim Socket1 As Socket
Dim AStreams As AsyncStreams
Socket1.Initialize("Socket1")
Socket1.Connect(IP,30704,3000)
AStreams.InitializePrefix(Socket1.InputStream, False, Socket1.OutputStream, "AStreams")
...
Dim Byt1(11) As byte 'AAAA010000000004000159
Byt1(0)=170
Byt1(1)=170
Byt1(2)=001
Byt1(3)=000
Byt1(4)=000
Byt1(5)=000
Byt1(6)=000
Byt1(7)=004
Byt1(8)=000
Byt1(9)=001
Byt1(10)=089
AStreams.Write(Byt1())
Android code is not working. Can you tell what wrong is with it?
In PPC version I do it in this way:
Client.New1
Client.Connect(IP,30704)
bin.New1(Client.GetStream,False)
...
Dim Byt1(11) As byte 'AAAA010000000004000159
Byt1(0)=170
Byt1(1)=170
Byt1(2)=001
Byt1(3)=000
Byt1(4)=000
Byt1(5)=000
Byt1(6)=000
Byt1(7)=004
Byt1(8)=000
Byt1(9)=001
Byt1(10)=089
bin.WriteBytes(Byt1())
In Android version I tried:
Dim Socket1 As Socket
Dim AStreams As AsyncStreams
Socket1.Initialize("Socket1")
Socket1.Connect(IP,30704,3000)
AStreams.InitializePrefix(Socket1.InputStream, False, Socket1.OutputStream, "AStreams")
...
Dim Byt1(11) As byte 'AAAA010000000004000159
Byt1(0)=170
Byt1(1)=170
Byt1(2)=001
Byt1(3)=000
Byt1(4)=000
Byt1(5)=000
Byt1(6)=000
Byt1(7)=004
Byt1(8)=000
Byt1(9)=001
Byt1(10)=089
AStreams.Write(Byt1())
Android code is not working. Can you tell what wrong is with it?