From 56fbc007db1c0c64ab855d5652b6ea1d269031fe Mon Sep 17 00:00:00 2001 From: youngwolf Date: Fri, 15 Jan 2021 13:49:29 +0800 Subject: [PATCH] A trivial change on demos. --- examples/echo_client/echo_client.cpp | 2 +- examples/echo_server/echo_server.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/echo_client/echo_client.cpp b/examples/echo_client/echo_client.cpp index db74bfa..b6ea059 100644 --- a/examples/echo_client/echo_client.cpp +++ b/examples/echo_client/echo_client.cpp @@ -30,7 +30,7 @@ #define ASCS_MSG_BUFFER_SIZE 1000000 #define ASCS_MAX_SEND_BUF (10 * ASCS_MSG_BUFFER_SIZE) #define ASCS_MAX_RECV_BUF (10 * ASCS_MSG_BUFFER_SIZE) -#define ASCS_DEFAULT_UNPACKER flexible_unpacker +#define ASCS_DEFAULT_UNPACKER flexible_unpacker<> //this unpacker only pre-allocated a buffer of 4000 bytes, but it can parse messages up to ST_ASIO_MSG_BUFFER_SIZE (here is 1000000) bytes, //it works as the default unpacker for messages <= 4000, otherwise, it works as non_copy_unpacker #elif 1 == PACKER_UNPACKER_TYPE diff --git a/examples/echo_server/echo_server.cpp b/examples/echo_server/echo_server.cpp index 61cedc4..87c1f13 100644 --- a/examples/echo_server/echo_server.cpp +++ b/examples/echo_server/echo_server.cpp @@ -30,7 +30,7 @@ #define ASCS_MSG_BUFFER_SIZE 1000000 #define ASCS_MAX_SEND_BUF (10 * ASCS_MSG_BUFFER_SIZE) #define ASCS_MAX_RECV_BUF (10 * ASCS_MSG_BUFFER_SIZE) -#define ASCS_DEFAULT_UNPACKER flexible_unpacker<> +#define ASCS_DEFAULT_UNPACKER flexible_unpacker //this unpacker only pre-allocated a buffer of 4000 bytes, but it can parse messages up to ST_ASIO_MSG_BUFFER_SIZE (here is 1000000) bytes, //it works as the default unpacker for messages <= 4000, otherwise, it works as non_copy_unpacker #elif 1 == PACKER_UNPACKER_TYPE -- GitLab