mirror of
https://github.com/qicosmos/rest_rpc.git
synced 2026-08-30 00:50:48 +08:00
update msgpack to 4.1.1
This commit is contained in:
@@ -191,6 +191,12 @@ void test_download() {
|
||||
}
|
||||
}
|
||||
|
||||
struct dummy1 {
|
||||
size_t id;
|
||||
std::wstring str;
|
||||
MSGPACK_DEFINE(id, str);
|
||||
};
|
||||
|
||||
void test_echo() {
|
||||
rpc_client client("127.0.0.1", 9000);
|
||||
bool r = client.connect();
|
||||
@@ -199,6 +205,12 @@ void test_echo() {
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
dummy1 d1{42, L"test"};
|
||||
auto result = client.call<dummy1>("get_dummy", d1);
|
||||
std::cout << result.id << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
auto result = client.call<std::string>("echo", "test");
|
||||
std::cout << result << std::endl;
|
||||
@@ -624,7 +636,7 @@ void benchmark_test() {
|
||||
}
|
||||
|
||||
int main() {
|
||||
//benchmark_test();
|
||||
// benchmark_test();
|
||||
test_connect();
|
||||
test_callback();
|
||||
test_echo();
|
||||
|
||||
Reference in New Issue
Block a user