Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Classes | |
class | StunDiscovery |
Public Member Functions | |
synchronized boolean | isDirectConnectionAvailable () |
synchronized Collection < InetSocketAddress > | getPublicIpAddresses () |
Collection< InetSocketAddress > | discover (String stunAddress, int stunPort, int timeout) |
Collection<InetSocketAddress> de.fu_berlin.inf.dpp.net.stun.internal.StunServiceImpl.discover | ( | String | stunAddress, |
int | stunPort, | ||
int | timeout | ||
) |
Starts a WAN (public / external) IP discovery of this system using STUN protocol RFC 5389 via UDP.
stunAddress | address of the STUN server |
stunPort | port of the STUN server, if 0 the default STUN port is used |
timeout | timeout in milliseconds before the discovery is aborted |
this method blocks until the discovery has finished or the timeout is exceeded
Implements de.fu_berlin.inf.dpp.net.stun.IStunService.
synchronized Collection<InetSocketAddress> de.fu_berlin.inf.dpp.net.stun.internal.StunServiceImpl.getPublicIpAddresses | ( | ) |
Returns the currently discovered public IP addresses. The collection will be empty if no discovery has performed yet, is still running or failed. The collection may also be incomplete if the discovery process has not finished for all network interfaces at the time this method is called.
Implements de.fu_berlin.inf.dpp.net.stun.IStunService.
synchronized boolean de.fu_berlin.inf.dpp.net.stun.internal.StunServiceImpl.isDirectConnectionAvailable | ( | ) |
Returns whether one of the available network interfaces is connected directly to the Internet.
true
if a network interfaces is connected directly to the Internet, false
otherwise or if no discovery was performed or is still running. Implements de.fu_berlin.inf.dpp.net.stun.IStunService.