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 int getRemotePort() { return s.getPort(); }
public InetAddress getRemoteAddress() { return ((InetSocketAddress)s.getRemoteSocketAddress()).getAddress(); }
public void println(String s) { logWrite(s); out.write(s); out.write(newLine); flush(); }
public void flush() { if (out != null) try { out.w.flush(); } catch(IOException e) { ioe(e); } }
- public void close() { in.close(); out.close(); }
+ public void close() { try { in.close(); } finally { out.close(); } }
public void setNewline(String s) { newLine = s; }