Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.net.stun.IStunService Interface Reference
Inheritance diagram for de.fu_berlin.inf.dpp.net.stun.IStunService:
de.fu_berlin.inf.dpp.net.stun.internal.StunServiceImpl

List of all members.

Public Member Functions

boolean isDirectConnectionAvailable ()
Collection< InetSocketAddress > getPublicIpAddresses ()
Collection< InetSocketAddress > discover (String stunAddress, int stunPort, int timeout)

Static Public Attributes

static final int DEFAULT_STUN_PORT = 3478

Member Function Documentation

Collection<InetSocketAddress> de.fu_berlin.inf.dpp.net.stun.IStunService.discover ( String  stunAddress,
int  stunPort,
int  timeout 
)

Starts a WAN (public / external) IP discovery of this system using STUN protocol RFC 5389 via UDP.

Parameters:
stunAddressaddress of the STUN server
stunPortport of the STUN server, if 0 the default STUN port is used
timeouttimeout in milliseconds before the discovery is aborted
Returns:
the currently discovered public IP addresses and the port associated with this IP.

this method blocks until the discovery has finished or the timeout is exceeded

Implemented in de.fu_berlin.inf.dpp.net.stun.internal.StunServiceImpl.

Collection<InetSocketAddress> de.fu_berlin.inf.dpp.net.stun.IStunService.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.

Returns:
the currently discovered public IP addresses and the port associated with this IP.

Implemented in de.fu_berlin.inf.dpp.net.stun.internal.StunServiceImpl.

boolean de.fu_berlin.inf.dpp.net.stun.IStunService.isDirectConnectionAvailable ( )

Returns whether one of the available network interfaces is connected directly to the Internet.

Returns:
true if a network interfaces is connected directly to the Internet, false otherwise or if no discovery was performed or is still running.

Implemented in de.fu_berlin.inf.dpp.net.stun.internal.StunServiceImpl.


Member Data Documentation

 All Classes Namespaces Files Functions Variables Enumerations