started with simple usage doc

This commit is contained in:
kremsy
2015-06-21 21:45:52 +02:00
parent 73ae826e44
commit a025211dfd
3 changed files with 36 additions and 2 deletions

View File

@ -196,7 +196,7 @@ class SocketManager implements CallbackListener {
$buffer = '';
$connection->on('data', function ($data) use (&$buffer, &$connection) {
$buffer .= $data;
$arr = explode("\n", $buffer, 2); // much haxy.
$arr = explode("\n", $buffer, 2);
while (count($arr) == 2 && strlen($arr[1]) >= (int) $arr[0]) {
// received full message
$len = (int) $arr[0];