public class Server {
public static void main(String[] args) throws Exception {
Local local = new Local(22222);
local.getSocket().setSoTimeout(10);
local.addListener(new Listener() {
@Override
public void received(SocketAddress address, byte[] data) {
System.out.println("Received " + new String(data) + " from " + address);
}
});