org.lastbamboo.common.stun.server
Interface StunServer

All Known Implementing Classes:
AbstractStunServer, TcpStunServer, UdpStunServer

public interface StunServer

Interface for starting a STUN server.


Method Summary
 void addIoServiceListener(org.littleshoot.mina.common.IoServiceListener serviceListener)
           
 void close()
           
 InetSocketAddress getBoundAddress()
          Gets the address the server is bound to.
 void start()
          Starts the server on the default STUN port.
 void start(InetSocketAddress bindAddress)
          Starts the server, binding to the specified address.
 

Method Detail

start

void start()
           throws IOException
Starts the server on the default STUN port.

Throws:
IOException - If we cannot bind to the port.

start

void start(InetSocketAddress bindAddress)
           throws IOException
Starts the server, binding to the specified address. If the argument is null, this will choose an available port to bind to.

Parameters:
bindAddress - The address to bind to.
Throws:
IOException - If we cannot bind to the specified address, even when this is null and we choose it randomly.

getBoundAddress

InetSocketAddress getBoundAddress()
Gets the address the server is bound to.

Returns:
The address the server is bound to.

addIoServiceListener

void addIoServiceListener(org.littleshoot.mina.common.IoServiceListener serviceListener)

close

void close()


Copyright © 2013 LittleShoot. All Rights Reserved.