Android Question For Astreams New Data

zhuxiaoge888

Member
Licensed User
Hallo,
Sometimes i can get the information in a row , sometimes i cant get the information in a row . what can i do??
Unbenannt.PNG
 

DonManfred

Expert
Licensed User
Longtime User
Sometimes i can get the information in a row , sometimes i cant get the information in a row

From the asyncstream tutorial (i´ve marked the message in there):
In other cases you should use AsyncStreams in regular mode. This means that there is no guarantee that each sent message will be received as a single message. In fact it is more or less guaranteed not to happen. So your code is responsible for correctly collecting and receiving the message.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is how network communication works. You cannot rely on the messages to be received as a single "packet". If each line ends with an end of line character (or any other specific character) then you can use AsyncStreamsText.

Please don't make such posts in the future.
 
Upvote 0
Top