提交 8d038472 编写于 作者: Y youngwolf

Introduce macro ASCS_UNPACKER_STRIPPED to control i_unpacker's default value...

Introduce macro ASCS_UNPACKER_STRIPPED to control i_unpacker's default value of the stripped property.
上级 d72627f3
......@@ -196,7 +196,7 @@ public:
typedef ASCS_RECV_BUFFER_TYPE buffer_type;
protected:
i_unpacker() : _stripped(true) {}
i_unpacker() : _stripped(ASCS_UNPACKER_STRIPPED) {}
virtual ~i_unpacker() {}
public:
......
......@@ -861,6 +861,7 @@
* FIX:
*
* ENHANCEMENTS:
* Introduce macro ASCS_UNPACKER_STRIPPED to control i_unpacker's default value of the stripped property.
*
* DELETION:
*
......@@ -963,6 +964,11 @@ static_assert(ASCS_MAX_RECV_BUF > 0, "recv buffer capacity must be bigger than z
#define ASCS_WEBSOCKET_BINARY 1
#endif
//i_unpacker's default value of the stripped property, must be boolean.
#ifndef ASCS_UNPACKER_STRIPPED
#define ASCS_UNPACKER_STRIPPED true
#endif
//by defining this, virtual function socket::calc_shrink_size will be introduced and be called when send buffer is insufficient before sending message,
//the return value will be used to determine how many messages (in bytes) will be discarded (from the oldest ones), 0 means don't shrink send buffer,
//you can rewrite it or accept the default implementation---1/3 of the current size.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册