I am using the socket class and using a traditional method of reading the socket by 1024 byte.
This causes an issue as the app I am writing needs to monitor this socket line by line in sequence live to properly work
So for instance I read from the socket
Event:caller
View state:6369
Event:hangup
Ev
...
The socket never closes, but my next read could be cutoff such as
ent:Answer
Viewstate:8846
As you can see above the ev got cut off due to the 1024 read.
I instead want to read the buffer in sequence stopping at the line feeds so my text can be fully evaluated. How would I do this?
This causes an issue as the app I am writing needs to monitor this socket line by line in sequence live to properly work
So for instance I read from the socket
Event:caller
View state:6369
Event:hangup
Ev
...
The socket never closes, but my next read could be cutoff such as
ent:Answer
Viewstate:8846
As you can see above the ev got cut off due to the 1024 read.
I instead want to read the buffer in sequence stopping at the line feeds so my text can be fully evaluated. How would I do this?