Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Add command line parser #15

Open
RobertIndie opened this issue May 10, 2020 · 0 comments
Open

[Feat] Add command line parser #15

RobertIndie opened this issue May 10, 2020 · 0 comments

Comments

@RobertIndie
Copy link
Owner

RobertIndie commented May 10, 2020

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 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant