added Connection.getSocket
[org.ibex.io.git] / src / org / ibex / io / Connection.java
index c6d333f..5c8d148 100644 (file)
@@ -13,6 +13,7 @@ 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; }
+    public Socket getSocket() { return s; }
     public void close()                       { try{s.close();}catch(Exception e){throw new Stream.StreamException(e);} super.close(); }
     public int getLocalPort()                 { return s.getLocalPort(); }
     public InetAddress getLocalAddress()      { return ((InetSocketAddress)s.getLocalSocketAddress()).getAddress(); }