Frage

So today I did this $fp = fsockopen($host, 80, $errno, $errstr, 50);. The stream should remain live for 50 seconds. I'm debugging using xdebug to step into each line of code and currently I'm one line passed my fsockopen line.

Does the socket still remain open for 50 real time seconds even though I'm in debug mode or does it wait until I finish debugging to count down?

War es hilfreich?

Lösung

The timeout only affects how long fsockopen() will wait for a connection. Once the connection has been established, there is a different timeout value used for reads/writes.

See the stream_set_timeout() documentation.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top