Thank you for your quick response.
This what I found inside $host: $host = array_search( $sock, $this->_cache_sock );
Although I'm not sure if that is what you are asking for. I also don't know if is correct or not.
This is the part where I found it:
function _close_sock( $sock ) { $host = array_search( $sock, $this->_cache_sock ); fclose( $this->_cache_sock[$host] ); unset( $this->_cache_sock[$host] ); }// }}} // {{{ _connect_sock()/** * Connects $sock to $host, timing out after $timeout * * @param int $sock Socket to connect * @param string $host Host:IP to connect to * * @return bool * @access private */ function _connect_sock( &$sock, $host ) { list( $ip, $port ) = preg_split( '/:(?=\d)/', $host ); $sock = false; $timeout = $this->_connect_timeout; $errno = $errstr = null; for ( $i = 0; !$sock && $i < $this->_connect_attempts; $i++ ) { MediaWiki\suppressWarnings(); if ( $this->_persistent == 1 ) { $sock = pfsockopen( $ip, $port, $errno, $errstr, $timeout ); } else { $sock = fsockopen( $ip, $port, $errno, $errstr, $timeout ); } MediaWiki\restoreWarnings(); } if ( !$sock ) { $this->_error_log( "Error connecting to $host: $errstr\n" ); $this->_dead_host( $host ); return false; }