}
$this->socket = socket_create( AF_INET, SOCK_STREAM, SOL_TCP );
socket_set_nonblock( $this->socket );
}
$this->socket = socket_create( AF_INET, SOCK_STREAM, SOL_TCP );
socket_set_nonblock( $this->socket );
} elseif ( IP::isIPv6( $this->host ) ) {
throw new MWException( '$wgSquidServers does not support IPv6' );
} else {
} elseif ( IP::isIPv6( $this->host ) ) {
throw new MWException( '$wgSquidServers does not support IPv6' );
} else {
socket_set_block( $this->socket );
socket_shutdown( $this->socket );
socket_close( $this->socket );
socket_set_block( $this->socket );
socket_shutdown( $this->socket );
socket_close( $this->socket );
$bytesSent = socket_send( $socket, $buf, strlen( $buf ), $flags );
$bytesSent = socket_send( $socket, $buf, strlen( $buf ), $flags );
$bytesRead = socket_recv( $socket, $buf, self::BUFFER_SIZE, 0 );
$bytesRead = socket_recv( $socket, $buf, self::BUFFER_SIZE, 0 );
if ( $bytesRead === false ) {
$error = socket_last_error( $socket );
if ( $error != self::EAGAIN && $error != self::EINTR ) {
if ( $bytesRead === false ) {
$error = socket_last_error( $socket );
if ( $error != self::EAGAIN && $error != self::EINTR ) {
$numReady = socket_select( $readSockets, $writeSockets, $exceptSockets, $timeout );
$numReady = socket_select( $readSockets, $writeSockets, $exceptSockets, $timeout );
if ( $numReady === false ) {
wfDebugLog( 'squid', __METHOD__ . ': Error in stream_select: ' .
socket_strerror( socket_last_error() ) . "\n" );
if ( $numReady === false ) {
wfDebugLog( 'squid', __METHOD__ . ': Error in stream_select: ' .
socket_strerror( socket_last_error() ) . "\n" );