Add methods to close the connection.
[xudocci.git] / src / main / java / net / pterodactylus / irc / Connection.java
index 530b0c7..ac29809 100644 (file)
@@ -278,6 +278,16 @@ public class Connection extends AbstractExecutionThreadService implements Servic
                connectionHandler.sendCommand("PRIVMSG", recipient, String.format("\u0001DCC RESUME %s %d %d\u0001", filename, port, position));
        }
 
+       /**
+        * Closes this connection.
+        *
+        * @throws IOException
+        *              if an I/O error occurs
+        */
+       public void close() throws IOException {
+               connectionHandler.close();
+       }
+
        //
        // ABSTRACTEXECUTIONTHREADSERVICE METHODS
        //