From f4e50620f757ec32209b2d02bea60718b9ac75d1 Mon Sep 17 00:00:00 2001 From: Kiritow <1362050620@qq.com> Date: Sat, 25 Aug 2018 23:28:12 +0800 Subject: [PATCH] change recvuntil to recvall in recvpack --- gsock_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsock_helper.cpp b/gsock_helper.cpp index aac0f64..9dc4859 100644 --- a/gsock_helper.cpp +++ b/gsock_helper.cpp @@ -157,7 +157,7 @@ int sock_helper::sendpack(const std::string& data) int sock_helper::recvpack(std::string& out_data) { long net_size; - int ret = recvuntil(&net_size, sizeof(long), []() {return false; }); + int ret = recvall(&net_size, sizeof(net_size)); if (ret <= 0) { return ret;