add constructor that connects to localhost at default port
[jSite2.git] / src / net / pterodactylus / util / fcp / FcpConnection.java
index 9a83f4e..d585022 100644 (file)
@@ -70,6 +70,17 @@ public class FcpConnection {
        private Map<String, Integer> incomingMessageStatistics = Collections.synchronizedMap(new HashMap<String, Integer>());
 
        /**
+        * Creates a new FCP connection to the freenet node running on localhost,
+        * using the default port.
+        * 
+        * @throws UnknownHostException
+        *             if the hostname can not be resolved
+        */
+       public FcpConnection() throws UnknownHostException {
+               this(InetAddress.getLocalHost());
+       }
+
+       /**
         * Creates a new FCP connection to the Freenet node running on the given
         * host, listening on the default port.
         *