react-php/react — pull request #36 by cboden (2012-06-17 13:35:50+00:00)
Title: [WIP] [Socket] Buffering large messages

Bug fix: yes
Feature addition: yes
Backwards compatibility break: maybe
Unit tests pass: nope
ToDo: Handle other errors (not just assume they're all buffer overflow), fix unit tests, better exceptions

Added a chunkSize parameter to set the number of bytes the buffer will write at one time
The write listener will only be removed when the buffer has been emptied
Removed exception error handler:
fwrite can send data AND trigger an error, the exception destroyed the $sent variable