@@ -0,0 +1,988 @@
+/* %0A * Copyright (c) 2012, noxan%0A * See LICENSE for details.%0A */%0A%0Apackage com.github.noxan.aves.demo;%0A%0Aimport com.github.noxan.aves.net.Connection;%0Aimport com.github.noxan.aves.server.ServerHandler;%0Aimport com.github.noxan.aves.server.SocketServer;%0A%0Apublic class DemoServer implements ServerHandler %7B%0A    public static void main(String%5B%5D args) %7B%0A%09new DemoServer();%0A    %7D%0A%0A    private SocketServer server;%0A%0A    public DemoServer() %7B%0A%09server = new SocketServer(this);%0A%09server.start();%0A    %7D%0A%0A    @Override%0A    public void readData(Connection connection, Object data) %7B%0A%09System.out.println(connection + %22: %22 + data);%0A    %7D%0A%0A    @Override%0A    public void clientConnect(Connection connection) %7B%0A%09System.out.println(connection + %22 connect%22);%0A    %7D%0A%0A    @Override%0A    public void clientDisconnect(Connection connection) %7B%0A%09System.out.println(connection + %22 disconnect%22);%0A    %7D%0A%0A    @Override%0A    public void clientLost(Connection connection) %7B%0A%09System.out.println(connection + %22 lost%22);%0A    %7D%0A%7D%0A

create demo server that displays every event in system.out