From 47e5eb72c3a8b8dcfadc15c8a22e96ea441d1af6 Mon Sep 17 00:00:00 2001 From: Emil Ivov Date: Mon, 23 Oct 2006 16:23:27 +0000 Subject: [PATCH] Working on the JMF implementation of the media service. Added a method for retrieving a public address for a port (without specifying an intended destination), in which case we will be using the address of our stun server as a destination. --- .../netaddr/NetworkAddressManagerService.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/net/java/sip/communicator/service/netaddr/NetworkAddressManagerService.java b/src/net/java/sip/communicator/service/netaddr/NetworkAddressManagerService.java index 7e028a91d..12d22bf67 100644 --- a/src/net/java/sip/communicator/service/netaddr/NetworkAddressManagerService.java +++ b/src/net/java/sip/communicator/service/netaddr/NetworkAddressManagerService.java @@ -50,14 +50,25 @@ public interface NetworkAddressManagerService * STUN lib fails, tries to retrieve localhost, if that fails too, returns * null. * - * @param indendedDestination the destination that we'd like to use this + * @param intendedDestination the destination that we'd like to use this * address with. * @param port the port whose mapping we are interested in. * @return a public address corresponding to the specified port or null if * all attempts to retrieve such an address have failed. */ - public InetSocketAddress getPublicAddressFor(InetAddress indendedDestination, - int port); + public InetSocketAddress getPublicAddressFor( + InetAddress intendedDestination, + int port); + + /** + * Tries to obtain a mapped/public address for the specified port (possibly + * by executing a STUN query). + * + * @param port the port whose mapping we are interested in. + * @return a public address corresponding to the specified port or null + * if all attempts to retrieve such an address have failed. + */ + public InetSocketAddress getPublicAddressFor(int port); /** * Initializes the network address manager service implementation and