mirror of
https://github.com/Kiritow/GSock.git
synced 2024-03-22 13:10:51 +08:00
change recvuntil to recvall in recvpack
This commit is contained in:
parent
271fafd576
commit
f4e50620f7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user