02-21-2022 02:06 PM
I am looking to use a TCP connection but I have been unable to successfully reproduce a 'bytes at port' reader for the TCP line before a Read function.
02-21-2022 02:12 PM
Conventionally, the sender send 4 bytes first, indicating the size of the following message. Else just keep reading and parse as needed.
Do you have control over the sender code?
02-21-2022 03:00 PM
I know that the data i am reading comes in the format * 0,0,0,0 (minimum length) or * -10000,-10000,-10000,-10000 (maximum length)
02-21-2022 05:25 PM
Does the message end with a Carriage Return and/or a Line Feed? If it ends with the CR LF, you can set the TCP Read to use CRLF mode and it will then read up to that byte combination.