


import CTL.*;
import CTL.Types.*;

public class Server {
	
    public static void main (String[] args) {
	
	    try {
			boolean dmn = true;
			int port = 0;

			if (args.length > 0) {
				port = RUtil.tryInt(args[0]);
				dmn = (port != -1);
			}

			Group grp = null;
			
			if (!dmn)
				grp = new Group(args);
			else
				grp = new Group("localhost", port, 0, 2, Location.TCP, null);
			grp.run();
		}
		catch (Exception e) {
			RUtil.except(e);
		}
	}
}
