J'ai pu de messages de warning quand je build le client
This commit is contained in:
parent
aab3301234
commit
03be36ecda
@ -806,10 +806,10 @@ std::vector<netprot::Packet> netprot::recvPacks(SOCKET sock, Buffer* buf) {
|
||||
int len = 0, end = 0;
|
||||
bool pck_received = false;
|
||||
char* cursor = nullptr;
|
||||
|
||||
|
||||
while (true) {
|
||||
while (!pck_received) {
|
||||
int bytes = recv(sock, &buf->ptr[len], buf->len - len, NULL);
|
||||
int bytes = recv(sock, &buf->ptr[len], buf->len - len, 0);
|
||||
if (bytes < 0) // si recv() retourne -1; ça veut dire qu'il y a plus rien a lire.
|
||||
return lsPck;
|
||||
len += bytes;
|
||||
@ -930,4 +930,4 @@ void netprot::sendPackTo<netprot::Packet>(SOCKET sock, Packet* pack, char** buf,
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user