Code example for InetSocketAddress

Methods: getAddress, getPort

0
	public SocketForwardDirect(InetSocketAddress socketAddress) {
		this.socketAddress = socketAddress;
	} 
 
	public void connect() throws IOException { 
		log.info("connect: " + socketAddress.getAddress().getHostAddress() + ":" + socketAddress.getPort());
		Socket sc = new Socket();
		sc.setReuseAddress(true);
		sc.connect(socketAddress);
		socksStreams = new SocketStreams(sc);
	} 
 
	public SocketStreams socketStreams() { 
		return socksStreams;
	} 
 
	public void close() { 
		if (log.isDebugEnabled())
			log.debug("close:");
		socksStreams.close();
	}