dejanb / stomp-php

Stomp PHP Client
http://stomp.fusesource.org/documentation/php/
93 stars 46 forks source link

bug fix for Stomp::readFrame, was occasionally reading more than one Frame #22

Closed boonedox closed 11 years ago

boonedox commented 11 years ago

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.

monofone commented 11 years ago

Thanks for your Help