去除编译警告,修复bug

This commit is contained in:
xia-chu
2021-01-19 16:05:38 +08:00
parent 5d752c89b5
commit f63b2b1863
51 changed files with 113 additions and 107 deletions

View File

@@ -19,7 +19,7 @@
*/
class SendInterceptor{
public:
typedef function<size_t (const Buffer::Ptr &buf)> onBeforeSendCB;
typedef function<ssize_t (const Buffer::Ptr &buf)> onBeforeSendCB;
SendInterceptor() = default;
virtual ~SendInterceptor() = default;
virtual void setOnBeforeSendCB(const onBeforeSendCB &cb) = 0;
@@ -53,7 +53,7 @@ protected:
* @param buf 需要截取的数据
* @return 数据字节数
*/
size_t send(Buffer::Ptr buf) override {
ssize_t send(Buffer::Ptr buf) override {
if (_beforeSendCB) {
return _beforeSendCB(buf);
}