private final Socket s;
public final String vhost;
public Connection(Socket s, String vhost) { super(s); this.vhost = vhost; this.s = s; }
+ public void close() { try{s.close();}catch(Exception e){throw new StreamException(e);} super.close(); }
public int getLocalPort() { return s.getLocalPort(); }
+ public InetAddress getLocalAddress() { return ((InetSocketAddress)s.getLocalSocketAddress()).getAddress(); }
public int getRemotePort() { return s.getPort(); }
public InetAddress getRemoteAddress() { return ((InetSocketAddress)s.getRemoteSocketAddress()).getAddress(); }
public String getRemoteHostname() { return getRemoteAddress().getHostName(); }