public static void main(String[] args) throws IOException {
java.io.File path = new java.io.File("/tmp/fubar.sock");
path.deleteOnExit();
UnixSocketAddress address = new UnixSocketAddress(path);
UnixServerSocketChannel channel = UnixServerSocketChannel.open();
try {
Selector sel = NativeSelectorProvider.getInstance().openSelector();
channel.configureBlocking(false);
channel.socket().bind(address);
channel.register(sel, SelectionKey.OP_ACCEPT, new ServerActor(channel, sel));
while (sel.select() > 0) {
Set<SelectionKey> keys = sel.selectedKeys();
for (SelectionKey k : keys) {
Actor a = (Actor) k.attachment();