change recvuntil to recvall in recvpack

This commit is contained in:
Kirigaya Kazuto 2018-08-25 23:28:12 +08:00
parent 271fafd576
commit f4e50620f7

View File

@ -157,7 +157,7 @@ int sock_helper::sendpack(const std::string& data)
int sock_helper::recvpack(std::string& out_data) int sock_helper::recvpack(std::string& out_data)
{ {
long net_size; long net_size;
int ret = recvuntil(&net_size, sizeof(long), []() {return false; }); int ret = recvall(&net_size, sizeof(net_size));
if (ret <= 0) if (ret <= 0)
{ {
return ret; return ret;