Skip to content

[Feat] Add command line parser #15

Description

@RobertIndie

According to cxxopts, add following options:

  • h, host: set remote host
  • p, port: set remote port
  • t, threads: set the number of threads.
  • c, connections: set the number of connections.

Use the following codes to run smark:

  Smark smark;
  smark.setting.connection_count = 4; // -c 4 or --connections 4
  smark.setting.thread_count = 2; // -t 2 or --threads 2
  smark.setting.ip = "127.0.0.1"; // -h 127.0.0.1 or --host 127.0.0.1
  smark.setting.port = 12138; // -p 12138 or --port 12138
  smark.Run();

When the smark ends, print smark.status.finish_count .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions