package ipmi.test;

public class Main {

	public static void main(String[] args) {
		if (args.length >= 1) {
			String clientOrServer = args[0];
			if ("server".equalsIgnoreCase(clientOrServer)) {
				if (args.length < 2) {
					usage();
				} else {
					Integer port = Integer.valueOf(args[1]);
					Server server = new Server(port);
					server.start();
				}
			} else if ("client".equalsIgnoreCase(clientOrServer)) {
				Client client = new Client();
				client.start();
			} else {
				usage();
			}
		} else {
			usage();
		}
	}

	public static void usage() {
		System.out.println("Usage: \n" 
				+ "<CMD> server <port>\n"
				+ "or \n" 
				+ "<CMD> client\n");
	}
}

@@ -13,16 +13,129 @@
 .test;%0A%0A
+import io.netty.example.udt.echo.message.MsgEchoClient;%0Aimport io.netty.example.udt.echo.message.MsgEchoServer;%0A%0A
 public c
@@ -186,16 +186,33 @@
 %5B%5D args)
+ throws Exception
  %7B%0A%09%09if 
@@ -595,24 +595,212 @@
 nt.start();%0A
+%09%09%09%7D else if (%22echo-client%22.equalsIgnoreCase(clientOrServer)) %7B%0A%09%09%09%09MsgEchoClient.main(args);%0A%09%09%09%7D else if (%22echo-server%22.equalsIgnoreCase(clientOrServer)) %7B%0A%09%09%09%09MsgEchoServer.main(args);%0A
 %09%09%09%7D else %7B%0A

add launcher for echo client and server.