/* 
 * Copyright (c) 2012, noxan
 * See LICENSE for details.
 */

package com.github.noxan.aves.demo;

import java.io.IOException;

import com.github.noxan.aves.net.Connection;
import com.github.noxan.aves.server.Server;
import com.github.noxan.aves.server.ServerHandler;
import com.github.noxan.aves.server.SocketServer;

public class DemoServer implements ServerHandler {
    public static void main(String[] args) {
        Server server = new SocketServer(new DemoServer());
        try {
            server.start();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void readData(Connection connection, Object data) {
	System.out.println(connection + ": " + data);
    }

    @Override
    public void clientConnect(Connection connection) {
	System.out.println(connection + " connect");
    }

    @Override
    public void clientDisconnect(Connection connection) {
	System.out.println(connection + " disconnect");
    }

    @Override
    public void clientLost(Connection connection) {
	System.out.println(connection + " lost");
    }
}

@@ -671,25 +671,32 @@
 ect data) %7B%0A
-%09
+        
 System.out.p
@@ -797,33 +797,40 @@
 n connection) %7B%0A
-%09
+        
 System.out.print
@@ -929,33 +929,40 @@
 n connection) %7B%0A
-%09
+        
 System.out.print
@@ -1070,9 +1070,16 @@
 ) %7B%0A
-%09
+        
 Syst

fix indention in demo server