equal
deleted
inserted
replaced
43 |
43 |
44 // create listener to accept connections |
44 // create listener to accept connections |
45 final AsynchronousServerSocketChannel listener = |
45 final AsynchronousServerSocketChannel listener = |
46 AsynchronousServerSocketChannel.open() |
46 AsynchronousServerSocketChannel.open() |
47 .bind(new InetSocketAddress(0)); |
47 .bind(new InetSocketAddress(0)); |
48 listener.accept(null, new CompletionHandler<AsynchronousSocketChannel,Void>() { |
48 listener.accept((Void)null, new CompletionHandler<AsynchronousSocketChannel,Void>() { |
49 public void completed(AsynchronousSocketChannel ch, Void att) { |
49 public void completed(AsynchronousSocketChannel ch, Void att) { |
50 queue.add(ch); |
50 queue.add(ch); |
51 listener.accept(null, this); |
51 listener.accept((Void)null, this); |
52 } |
52 } |
53 public void failed(Throwable exc, Void att) { |
53 public void failed(Throwable exc, Void att) { |
54 } |
54 } |
55 public void cancelled(Void att) { |
55 public void cancelled(Void att) { |
56 } |
56 } |