I'm making a request for a socket but when it's offline socket_connect takes around 60s to inform me time out, is there any way I do not have to wait all this time when it's offline?
Sorry for the grammar. I'm using a translator.
I'm making a request for a socket but when it's offline socket_connect takes around 60s to inform me time out, is there any way I do not have to wait all this time when it's offline?
Sorry for the grammar. I'm using a translator.
You can set the time it waits for the connection to establish:
ini_set('default_socket_timeout', 10);
for a 10 second timeout.
Or you can set it in php.ini.