fread reads up to specified number of bytes or EOF.
fgets reads up to "\n", number of bytes or EOF.
The problem with fread is that if there is more than one Frame
on the socket, it will read the current Frame and part of the next
Frame. Stomp::readFrame() is expected to just read the next Frame.
fread reads up to specified number of bytes or EOF. fgets reads up to "\n", number of bytes or EOF.
The problem with fread is that if there is more than one Frame on the socket, it will read the current Frame and part of the next Frame. Stomp::readFrame() is expected to just read the next Frame.