IP can not be connected, to more than 20s will not return can not connect;
How to set the connection timeout, send timeout, return timeout
New people do not know how to use the score, but also please be generous to enlighten!! Thank you
Reply to discussion (solution)
Connection takes more than 20 seconds
Not in the manual?
Set $socket send timeout of 1 seconds, receive timeout of 3 seconds:
$socket = Socket_create (AF_INET,SOCK_STREAM,SOL_TCP);
Socket_set_option ($socket, Sol_socket,so_rcvtimeo,array ("SEC" =>1, "USEC" =>0));
Socket_set_option ($socket, Sol_socket,so_sndtimeo,array ("SEC" =>3, "USEC" =>0));
Set $socket send timeout of 1 seconds, receive timeout of 3 seconds:
$socket = Socket_create (AF_INET,SOCK_STREAM,SOL_TCP);
Socket_set_option ($socket, Sol_socket,so_rcvtimeo,array ("SEC" =>1, "USEC" =>0));
Socket_set_option ($socket, Sol_socket,so_sndtimeo,array ("SEC" =>3, "USEC" =>0));
Socket_connect ($socket, $address, $service _port) or Die ("could does connect with". $address); is usually the connection timeout, how to do the connection timeout??