org.littleshoot.stun.stack
Interface StunAddressProvider


public interface StunAddressProvider

Provider of STUN addresses.


Method Summary
 void close()
           
 InetSocketAddress getHostAddress()
          Gets the host address for this client, or the local address on a local network interface.
 InetSocketAddress getRelayAddress()
          Accessor the relay address using the STUN relay usage.
 InetSocketAddress getServerReflexiveAddress()
          Accessor for the "server reflexive address" for this ICE candidate, or the address from the perspective of a public STUN server.
 InetAddress getStunServerAddress()
          Accessor for the address of the STUN server.
 

Method Detail

getHostAddress

InetSocketAddress getHostAddress()
Gets the host address for this client, or the local address on a local network interface.

Returns:
The host address and port.

getServerReflexiveAddress

InetSocketAddress getServerReflexiveAddress()
                                            throws IOException
Accessor for the "server reflexive address" for this ICE candidate, or the address from the perspective of a public STUN server. This can block for a little while as the client continues sending packets if there's packet loss.

Returns:
The server reflexive address for this ICE candidate.
Throws:
IOException - If there's an IO error writing the message.

getStunServerAddress

InetAddress getStunServerAddress()
Accessor for the address of the STUN server.

Returns:
The address of the STUN server.

getRelayAddress

InetSocketAddress getRelayAddress()
Accessor the relay address using the STUN relay usage. If the client doesn't have an allocated address, this attempts to allocate one before returning.

Returns:
The allocated relay address, or null if no relay address could be obtained.

close

void close()


Copyright © 2013 LittleShoot. All Rights Reserved.