From bdcf521dcd182dee377bc842073a0e6a3a1a3f0a Mon Sep 17 00:00:00 2001 From: adam Date: Sat, 17 Mar 2007 08:48:46 +0000 Subject: [PATCH] remove Connection from org.ibex.io darcs-hash:20070317084846-5007d-6d8ca46eb1196a5bdc35096c30c9f65dad9bc7ce.gz --- src/org/ibex/io/Connection.java | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 src/org/ibex/io/Connection.java diff --git a/src/org/ibex/io/Connection.java b/src/org/ibex/io/Connection.java deleted file mode 100644 index 1ab0abe..0000000 --- a/src/org/ibex/io/Connection.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2000-2005 the Contributors, as shown in the revision logs. -// Licensed under the Apache Public Source License 2.0 ("the License"). -// You may not use this file except in compliance with the License. - -package org.ibex.io; - -import java.net.*; -import java.io.*; -import org.ibex.util.*; - -/** a stream backed by a socket */ -public class Connection extends Stream { - private final Socket s; - public final String vhost; - public Connection(Socket s, String vhost) { super(s); this.vhost = vhost; this.s = s; } - protected Connection(InputStream i, OutputStream o) { super(i, o); vhost = null; s = null; } - public Socket getSocket() { return s; } - - 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(); } - public String getVirtualHost() { return vhost; } - public void setTimeout(int ms) { try { s.setSoTimeout(ms); } catch(IOException e) { ioe(e); } } - public void setTcpNoDelay(boolean delay) { try { s.setTcpNoDelay(delay); } catch(IOException e) { ioe(e); } } - - /** never throws an exception */ - public void close() { try{if (s!=null) s.close();}catch(Exception e){/*ignore*/} super.close(); } -} - -- 1.7.10.4