package ru.nsu.ccfit.bogush;

public class Server {
	public static void main(String[] args) {
		Server server = new Server();
	}
}

@@ -27,103 +27,1386 @@
 h;%0A%0A
-public class Server %7B%0A%09public static void main(String%5B%5D args) %7B%0A%09%09Server server = new Server();
+import org.apache.logging.log4j.LogManager;%0Aimport org.apache.logging.log4j.Logger;%0A%0Aimport java.io.IOException;%0Aimport java.net.ServerSocket;%0Aimport java.net.Socket;%0Aimport java.util.ArrayList;%0A%0Apublic class Server %7B%0A%09static %7B LoggingConfiguration.addConfigFile(LoggingConfiguration.DEFAULT_LOGGER_CONFIG_FILE); %7D%0A%0A%09private static final Logger logger = LogManager.getLogger();%0A%0A%09private static final int PORT = 25565;%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09logger.traceEntry(%22main%22);%0A%09%09Server server = new Server(PORT);%0A%09%09server.start();%0A%09%09logger.traceExit(%22main%22, null);%0A%09%7D%0A%0A%09private ArrayList%3CConnection%3E connections = new ArrayList%3C%3E();%0A%09private int port;%0A%0A%09private Server() %7B%0A%09%09this(0);%0A%09%7D%0A%0A%09private Server(int port) %7B%0A%09%09logger.traceEntry(%22Server%22);%0A%09%09this.port = port;%0A%09%09logger.traceExit(%22Server%22, null);%0A%09%7D%0A%0A%09private void start() %7B%0A%09%09logger.traceEntry(%22start%22);%0A%09%09try (ServerSocket serverSocket = new ServerSocket(port))%7B%0A%09%09%09if (port == 0) port = serverSocket.getLocalPort();%0A%09%09%09logger.debug(%22Created socket on port %7B%7D%22, port);%0A%09%09%09while (true) %7B%0A%09%09%09%09Socket socket = serverSocket.accept();%0A%09%09%09%09logger.info(%22%7B%7D connected%22, socket.getInetAddress().getHostAddress());%0A%09%09%09%09Connection connection = new Connection(this, socket);%0A%09%09%09%09connections.add(connection);%0A%09%09%09%7D%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D finally %7B%0A%09%09%09logger.traceExit(%22start%22, null);%0A%09%09%7D
 %0A%09%7D%0A

Implement raw version of Server