<p>getRemoteRealAddr.</p>

@param realIpHeader a {@link java.lang.String} object.
@return a {@link java.lang.String} object.
4821
public String getRemoteRealAddr(String realIpHeader) {
        String host = getProxyRemoteAddr(realIpHeader);
        if (host == null || host.equals("unknown")) {
            host = getRemoteAddr();
        }

        return host;
    }
1025947
public SockAddr getAddr() {
		SockAddr sockAddr = null;
		if (this.addr != null) {
			sockAddr = new SockAddr(this.addr.getSaFamily().getValue(), this.addr.getData());
		}
		return sockAddr;
	}
414502
@Override
    public String getRemoteAddr() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getRemoteAddr();
        return null;
    }
1292571
public final Object getRealObject(Object objectOrProxy)
    {
        if(isNormalOjbProxy(objectOrProxy))
        {
            String msg;

            try
            {
                return getIndirectionHandler(objectOrProxy).getRealSubject();
            }
            catch(ClassCastException e)
            {
                // shouldn't happen but still ...
                msg = "The InvocationHandler for the provided Proxy was not an instance of " + IndirectionHandler.class.getName();
                log.error(msg);
                throw new PersistenceBrokerException(msg, e);
            }
            catch(IllegalArgumentException e)
            {
                msg = "Could not retrieve real object for given Proxy: " + objectOrProxy;
                log.error(msg);
                throw new PersistenceBrokerException(msg, e);
            }
            catch(PersistenceBrokerException e)
            {
                log.error("Could not retrieve real object for given Proxy: " + objectOrProxy);
                throw e;
            }
        }
        else if(isVirtualOjbProxy(objectOrProxy))
        {
            try
            {
                return ((VirtualProxy) objectOrProxy).getRealSubject();
            }
            catch(PersistenceBrokerException e)
            {
                log.error("Could not retrieve real object for VirtualProxy: " + objectOrProxy);
                throw e;
            }
        }
        else
        {
            return objectOrProxy;
        }
    }
1203928
public String getRemoteHost()
    {
        String host = "127.0.0.1";
        HttpConnection connection = getHttpConnection();
        if (connection != null)
        {
            host = connection.getRemoteHost();
            if (host == null) host = connection.getRemoteAddr();
        }
        return host;
    }
572092
public static String getClientIPByHeader(HttpServletRequest request, String... headerNames) {
		String ip;
		for (String header : headerNames) {
			ip = request.getHeader(header);
			if (false == isUnknow(ip)) {
				return getMultistageReverseProxyIp(ip);
			}
		}

		ip = request.getRemoteAddr();
		return getMultistageReverseProxyIp(ip);
	}
626975
public static <V extends VersionedProtocol> V getProxy(Class<V> protocol, InetSocketAddress addr)
			throws IOException {

		return getProxy(protocol, addr, NetUtils.getDefaultSocketFactory());
	}
945840
protected String getRemoteAddress(ContainerRequestContext request) {
        String ip = null;
        if (realIpHeader != null && realIpHeader.length() != 0) {
            ip = request.getHeaderString(realIpHeader);
        }
        if (StringUtils.isBlank(ip)) {
            ip = request.getHeaderString("x-forwarded-for");
            if (StringUtils.isBlank(ip) || "unknown".equalsIgnoreCase(ip)) {
                ip = request.getHeaderString("Proxy-Client-IP");
            }
            if (StringUtils.isBlank(ip) || "unknown".equalsIgnoreCase(ip)) {
                ip = request.getHeaderString("WL-Proxy-Client-IP");
            }
            if (StringUtils.isBlank(ip) || "unknown".equalsIgnoreCase(ip)) {
                ip = "unknown";
            }
        }
        return ip;
    }
296032
public static String getRemoteAddress(Channel channel) {
    if (channel != null && channel.remoteAddress() != null) {
      return channel.remoteAddress().toString();
    }
    return "<unknown remote>";
  }
321606
@Override
    public String getRemoteHost() {
        String addr = this.connection.getRemoteHostName(true);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getRemoteHost: " + addr);
        }
        return addr;
    }
181135
public String getRemoteHost()
    {
        if (_remoteHost==null)
        {
            if (_resolveRemoteHost)
            {
                if (_remoteInetAddress==null)
                    return "localhost";
                _remoteHost=_remoteInetAddress.getHostName();
            }
            else
            {
                if (_remoteInetAddress==null)
                    return "127.0.0.1";
                _remoteHost=getRemoteAddr();
            }
        }
        return _remoteHost;
    }
815147
public int getRemoteAddress(byte []buffer, int offset, int length)
  {
    String name = getRemoteHost();
    int len = name.length();

    for (int i = 0; i < len; i++)
      buffer[i + offset] = (byte) name.charAt(i);

    return len;
  }

  public Socket getSocket()
  {
    throw new UnsupportedOperationException(getClass().getName());
  }

  public void setSocket(Socket socket)
  {
    throw new UnsupportedOperationException(getClass().getName());
  }
  
  /**
   * Returns the TLS negotiated protocol, if available.
   */
  public String getNegotiatedProtocol()
  {
    return null;
  }

  /**
   * 
   */
  public byte[] getRemoteIP()
  {
    InetAddress addr = addressRemote();
    return addr.getAddress();
  }
  
  /**
   * Returns the remote client's port.
   */
  abstract public int portRemote();

  public void tcpNoDelay(boolean value)
    throws SocketException
  {
  }

  public void setSoTimeout(long ms)
    throws SocketException
  {
  }

  public long getSoTimeout()
  {
    return -1;
  }

  public void ssl(SSLFactory sslFactory)
  {
    throw new UnsupportedOperationException(getClass().getName());
  }

  /**
   * Returns true if the connection is secure.
   */
  public boolean isSecure()
  {
    return false;
  }

  /**
   * Returns any selectable channel.
   */
  public SelectableChannel selectableChannel()
  {
    throw new UnsupportedOperationException(getClass().getName());
  }

  /**
   * Returns the secure cipher algorithm.
   */
  public String cipherSuite()
  {
    return null;
  }

  /**
   * Returns the secure cipher algorithm.
   */
  public String secureProtocol()
  {
    return null;
  }

  /**
   * Returns the bits in the socket.
   */
  public int cipherBits()
  {
    return 0;
  }

  /**
   * Returns the client certificate.
   */
  public X509Certificate getClientCertificate()
    throws java.security.cert.CertificateException
  {
    return null;
  }

  /**
   * Returns the client certificate chain.
   */
  public X509Certificate []getClientCertificates()
    throws java.security.cert.CertificateException
  {
    X509Certificate cert = getClientCertificate();

    if (cert != null)
      return new X509Certificate[] { cert };
    else
      return null;
  }
  
  public void setRequestExpireTime(long expireTime)
  {
  }
4084
public InetSocketAddress getRemoteAddressTCP () {
		SocketChannel socketChannel = tcp.socketChannel;
		if (socketChannel != null) {
			Socket socket = tcp.socketChannel.socket();
			if (socket != null) {
				return (InetSocketAddress)socket.getRemoteSocketAddress();
			}
		}
		return null;
	}
140305
protected String getRemoteAddr(ApiRequest request, IPListConfig config) {
        String httpHeader = config.getHttpHeader();
        if (httpHeader != null && httpHeader.trim().length() > 0) {
            String value = (String) request.getHeaders().get(httpHeader);
            if (value != null) {
                return value;
            }
        }
        return request.getRemoteAddr();
    }
897278
def get_real_ip(request, right_most_proxy=False):
    
    warnings.warn('get_real_ip is deprecated and will be removed in 3.0.', DeprecationWarning)
    return get_ip(request, real_ip_only=True, right_most_proxy=right_most_proxy)
419685
function _getRemoteAddress( oSocket )
{
	let sRet;

	if ( 'object' !== typeof oSocket )
	{
		return null;
	}

	//	...
	sRet = oSocket.upgradeReq.connection.remoteAddress;
	if ( sRet )
	{
		//
		//	check for proxy
		//	ONLY VALID FOR 127.0.0.1 and resources addresses
		//
		if ( oSocket.upgradeReq.headers[ 'x-real-ip' ] && _isValidResourceAddress( sRet ) )
		{
			//	we are behind a proxy
			sRet = oSocket.upgradeReq.headers[ 'x-real-ip' ];
		}
	}

	return sRet;
}
630558
private function getRemoteAddress() : ?string
    {
        $hostname = null;

        if (isset($_SERVER['REMOTE_ADDR'])) {
            $hostname = filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP);

            if (false === $hostname) {
                $hostname = null;
            }
        }

        if (function_exists('apache_request_headers')) {
            $headers = apache_request_headers();

            if ($headers === false) {
                return $hostname;
            }

            foreach ($headers as $k => $v) {
                if (strcasecmp($k, 'x-forwarded-for')) {
                    continue;
                }

                $hostname = explode(',', $v);
                $hostname = trim($hostname[0]);
                break;
            }
        }

        return $hostname;
    }