Expost hostname and port number.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 2 May 2013 18:38:41 +0000 (20:38 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 2 May 2013 18:38:41 +0000 (20:38 +0200)
src/main/java/net/pterodactylus/irc/Connection.java

index ac29809..0cbbae8 100644 (file)
@@ -144,6 +144,22 @@ public class Connection extends AbstractExecutionThreadService implements Servic
        //
 
        /**
+        * Returns the hostname of the remote end of the connection.
+        * @return The remote’s hostname
+        */
+       public String hostname() {
+               return hostname;
+       }
+
+       /**
+        * Returns the port number of the remote end of the connection.
+        * @return The remote’s port number
+        */
+       public int port() {
+               return port;
+       }
+
+       /**
         * Returns whether this connection has already been established.
         *
         * @return {@code true} as long as this connection is established, {@code