note 17586 rejected from ref.sockets by zak

From: Date: Sat, 15 Dec 2001 07:42:57 +0000
Subject: note 17586 rejected from ref.sockets by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22843@lists.php.net to get a copy of this message
I just want to set a timeout value to $socket, just like this: $socket = socket(AF_INET, SOCK_STREAM, 0 ); if ( $socket < 0 ) { echo "error"; } else { $result = connect( $socket, $host, $port ); if ( $result < 0 ) { echo "error"; } else { setsockopt( $socket, SOL_SOCKET, SO_REVTIMEO, 2 ); read( $socket, $out, 128 ); ...... } } But, it seems do not work. read do not return after timeout. who can give me a help?

« previous php.notes (#22843) next »