metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
214 stars 159 forks source link

fixed send big data #266

Closed jansen-s closed 4 years ago

jansen-s commented 4 years ago

Teleinfo is a Chinese VSP that provides real-name verification. The real-name verification needs to provide a certificate picture. Most of the pictures are above 100K. When the connection method is set to non-blocking, a single fwrite action cannot send all data, so I will connect Changing the mode to blocking mode may affect performance, but it can ensure that all data is sent correctly. I have tested that uploading more than 1M can also succeed.

metaregistrar commented 4 years ago

I cannot accept a pull request that breaks code for other users. I will make this possibility to set the stream to blocking or not an option that can be enabled when needed.

metaregistrar commented 4 years ago

I have added the function $conn->setBlocking(true); so that you can enable stream_set_blocking if you need to. The default value is 'false' so that existing users are not affected.