Modified the recv function for 5x faster performance with big responses

Hello there!

I made some optimizations for the recv function. It now performs much faster with big responses.

Original Version
# time php large-response-test.php
There are 100000 keys in the response

real	0m13.201s
user	0m0.956s
sys	0m12.145s

New version
# time php large-response-test.php
There are 100000 keys in the response

real	0m2.269s
user	0m0.080s
sys	0m2.100s