/** * Return the server port as a byte array. * * @return the server port */ public byte[] getPort() { byte[] port = new byte[2]; int p = (getEndpointAddress() == null ? this.port : getEndpointAddress().getPort()); port[1] = (byte) p; port[0] = (byte) (p >> 8); return port; }
/** * Return the server port as a byte array. * * @return the server port */ public byte[] getPort() { byte[] port = new byte[2]; int p = (getEndpointAddress() == null ? this.port : getEndpointAddress().getPort()); port[1] = (byte) p; port[0] = (byte) (p >> 8); return port; }
/** * Return the server port as a byte array. * * @return the server port */ public byte[] getPort() { byte[] port = new byte[2]; int p = (getEndpointAddress() == null ? this.port : getEndpointAddress().getPort()); port[1] = (byte) p; port[0] = (byte) (p >> 8); return port; }
/** * @return the endpoint address resulting from the {@link #getEndpointAddress()}. * If not set, it will return the {@link SocksProxyConstants#FAKE_IP} constant * value which will be ignored in a SOCKS v4 request. */ public byte[] getIpAddress() { if (getEndpointAddress() == null) { return SocksProxyConstants.FAKE_IP; } return getEndpointAddress().getAddress().getAddress(); }
/** * Return the server host name. * * @return the server host name */ public synchronized final String getHost() { if (host == null) { InetSocketAddress adr = getEndpointAddress(); if (adr != null && !adr.isUnresolved()) { host = getEndpointAddress().getHostName(); } } return host; }
/** * Returns the endpoint address resulting from the {@link #getEndpointAddress()}. * If not set, it will return the {@link SocksProxyConstants#FAKE_IP} constant * value which will be ignored in a SOCKS v4 request. * * @return the endpoint address */ public byte[] getIpAddress() { if (getEndpointAddress() == null) { return SocksProxyConstants.FAKE_IP; } return getEndpointAddress().getAddress().getAddress(); }
/** * @return the endpoint address resulting from the {@link #getEndpointAddress()}. * If not set, it will return the {@link SocksProxyConstants#FAKE_IP} constant * value which will be ignored in a SOCKS v4 request. */ public byte[] getIpAddress() { if (getEndpointAddress() == null) { return SocksProxyConstants.FAKE_IP; } return getEndpointAddress().getAddress().getAddress(); }
/** * Return the server host name. * * @return the server host name */ public synchronized final String getHost() { if (host == null) { InetSocketAddress adr = getEndpointAddress(); if (adr != null && !adr.isUnresolved()) { host = getEndpointAddress().getHostName(); } } return host; }
/** * Return the server host name. * * @return the server host name */ public synchronized final String getHost() { if (host == null) { InetSocketAddress adr = getEndpointAddress(); if ( adr != null && !adr.isUnresolved()) { host = getEndpointAddress().getHostName(); } } return host; }
InetSocketAddress adr = request.getEndpointAddress(); byte addressType = 0; byte[] host = null;
throws UnsupportedEncodingException { int len = 6; InetSocketAddress adr = request.getEndpointAddress(); byte addressType = 0; byte[] host = null;
InetSocketAddress adr = request.getEndpointAddress(); byte addressType = 0; byte[] host = null;