NetworkServerAbstract: add getSocketAddress()
[WeStealzYourDataz.git] / src / uk / ac / ntu / n0521366 / wsyd / libs / net / NetworkServerAbstract.java
index 4119a5c..c86c0c4 100644 (file)
@@ -207,6 +207,15 @@ public abstract class NetworkServerAbstract extends SwingWorker<Integer, Network
         this(socketAddress, title, serviceToHostMap, null);
     }
 
+    /**
+     * Get the socket in use - not that (possibly wildcard/ephermeral) requested.
+     * 
+     * @return the port being used
+     */
+    public WSYD_SocketAddress getSocketAddress() {
+        return _socketAddress;
+    }
+
     /**
      * Enable or disable simulated received packet injection.
      *