add another example

This commit is contained in:
qicosmos
2019-01-10 06:03:42 +08:00
parent 01b5686f7f
commit 65c5c3b7e7
2 changed files with 20 additions and 0 deletions
+15
View File
@@ -69,7 +69,22 @@ void test_get_person_name() {
}
}
void test_get_person() {
try {
boost::asio::io_service io_service;
test_client client(io_service);
client.connect("127.0.0.1", "9000");
auto result = client.call<person>("get_person");
std::cout << result.name << std::endl;
}
catch (const std::exception& e) {
std::cout << e.what() << std::endl;
}
}
int main() {
test_get_person();
test_get_person_name();
test_hello();
test_add();