J
jussi
Hi gurus
So I'm getting wanted and unwanted data to an UDP socket. My problem
is, that some times a string that I'm intrested is spilled in two
pieces.
But I know that valid string starts with x02 and end with x03. So I
would like to have a hint how to do some thing like this:
while {1}
read data from socket until we get x02
append every data to $MY_VALID_DATA until we receive end mark
0x3
now we received x03
PROCESS $MY_VALID_DATA (which is x02???????????????x03
and start listening again.
Any help woulr be highly appreciate
-Jussi
So I'm getting wanted and unwanted data to an UDP socket. My problem
is, that some times a string that I'm intrested is spilled in two
pieces.
But I know that valid string starts with x02 and end with x03. So I
would like to have a hint how to do some thing like this:
while {1}
read data from socket until we get x02
append every data to $MY_VALID_DATA until we receive end mark
0x3
now we received x03
PROCESS $MY_VALID_DATA (which is x02???????????????x03
and start listening again.
Any help woulr be highly appreciate
-Jussi