-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (22 loc) · 879 Bytes
/
main.cpp
File metadata and controls
30 lines (22 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2021 atframework
// Created by owent on 2016/10/9.
//
#include <cli/cmd_option_phoenix.h>
#include <utility/client_config.h>
#include <utility/client_simulator.h>
#include <libatgateway_v2_c.h>
#include <cstdlib>
#include <memory>
int main(int argc, char *argv[]) {
libatgateway_v2_c_global_init_algorithms();
std::shared_ptr<client_simulator> client = std::make_shared<client_simulator>();
client->init();
client->get_option_manager()
->bind_cmd("-ip, --host", atfw::util::cli::phoenix::assign(client_config::host))
->set_help_msg("<domain or ip> set host or ip address of authsvr");
client->get_option_manager()
->bind_cmd("-p, --port", atfw::util::cli::phoenix::assign(client_config::port))
->set_help_msg("<port> set port of authsvr");
client_player::init_handles();
return client->run(argc, (const char **)argv);
}