Connecting Android with WinSocket

mc73

Well-Known Member
Licensed User
Longtime User
I use Asyncronous Streams without a problem, when connecting from one Adnroid device to another. Now, I need to do the same with Android connected to PC. I've used winsocket, no problem so far in communication, EXCEPT that I cannot figure out how to spli the packages received from the android device.
I'm sending data from the server (PC) using:
B4X:
myMessage="test" & vbCrLf
Socket(mySocket).sendData (myMessage)
myMessage="end" & vbCrLf
Socket(mySocket).sendData (myMessage)
[\CODE]

Now, in my android, I receive in one line "test" and in the next one "end", BUT NOT split as usually done when I use AsyncStreams between two android devices. Any idea on what can be wrong here? In the mean time, my workaround is to perform a regex.split basen on carriage return and get the lines seperated.
 
Top