From 64c32d0191b803facf4e867cb94d5eb6812ef1cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 2 May 2013 20:38:41 +0200 Subject: [PATCH] Expost hostname and port number. --- src/main/java/net/pterodactylus/irc/Connection.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/net/pterodactylus/irc/Connection.java b/src/main/java/net/pterodactylus/irc/Connection.java index ac29809..0cbbae8 100644 --- a/src/main/java/net/pterodactylus/irc/Connection.java +++ b/src/main/java/net/pterodactylus/irc/Connection.java @@ -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 -- 2.7.4