Commit 179b35a2 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Added getPort() method (JM-623).

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3686 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3c263498
...@@ -49,6 +49,13 @@ public interface Connection { ...@@ -49,6 +49,13 @@ public interface Connection {
*/ */
public InetAddress getInetAddress() throws UnknownHostException; public InetAddress getInetAddress() throws UnknownHostException;
/**
* Returns the port that the connection uses.
*
* @return the port that the connection uses.
*/
public int getPort();
/** /**
* Returns the Writer used to send data to the connection. The writer should be * Returns the Writer used to send data to the connection. The writer should be
* used with caution. In the majority of cases, the {@link #deliver(Packet)} * used with caution. In the majority of cases, the {@link #deliver(Packet)}
...@@ -254,7 +261,7 @@ public interface Connection { ...@@ -254,7 +261,7 @@ public interface Connection {
* compression is not available. Entities that request a compression negotiation * compression is not available. Entities that request a compression negotiation
* will get a stream error and their connections will be closed. * will get a stream error and their connections will be closed.
*/ */
disabled; disabled
} }
/** /**
...@@ -278,6 +285,6 @@ public interface Connection { ...@@ -278,6 +285,6 @@ public interface Connection {
* TLS is not available. Entities that request a TLS negotiation will get a stream * TLS is not available. Entities that request a TLS negotiation will get a stream
* error and their connections will be closed. * error and their connections will be closed.
*/ */
disabled; disabled
} }
} }
...@@ -229,6 +229,10 @@ public class SocketConnection implements Connection { ...@@ -229,6 +229,10 @@ public class SocketConnection implements Connection {
return socket.getInetAddress(); return socket.getInetAddress();
} }
public int getPort() {
return socket.getPort();
}
public Writer getWriter() { public Writer getWriter() {
return writer; return writer;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment