public void execute(String[] args) {
    if ((args.length > 0) && (args[0].equalsIgnoreCase("-s"))) {
      Server server = new Server(true);
      try {
        server.Listener();
      }
      catch (Exception ex) {
        ex.printStackTrace();
      }
    }
    else if ((args.length > 0) && (args[0].equalsIgnoreCase("-c"))) {
      /**
       * default values:
       * count of calls to server - 10
       * server ip - localhost
       */
      int callcount = 10;
      String ip = null;
      
      if (args.length == 2) {
        callcount = Integer.parseInt(args[1]);
      }
      else if (args.length == 3) {
        callcount = Integer.parseInt(args[1]);
        ip = args[2];
      }
      Client client = new Client(callcount, ip, true);
      try {
        client.Connect();
        try {
          client.RunTest();
        }
        finally {
          client.Disconnect();
        }
      }
      catch (Exception ex) {
        ex.printStackTrace();
      }
    }
    else {
      printHelp();
    }
  }