jodrell/php-epp — pull request #1 by nkukard (2012-09-16 00:39:13+00:00)
Title: Better non blocking

Here is a much better non-blocking IO enhancement.

The problem is some registrars don't seem to flush the socket when they sending the 4 bytes of length info. This means one could get say 1 byte, as there is no more data on the socket, the normal blocking read returns with just 1 byte. Obviously doesn't work as expected.

While one could argue with the EPP registrar(s) which this happens with, as the problem is clearly imho on their side. It cannot hurt for us to include code to support this and improve error handling at the same time.

I've tested the above changes out on 2 registrars and for me it works in both circumstances.