Update netprotocol.cpp
This commit is contained in:
parent
10fcfed05a
commit
d0c39e49b0
@ -810,7 +810,7 @@ std::vector<netprot::Packet> netprot::recvPacks(SOCKET sock, Buffer* buf) {
|
||||
while (true) {
|
||||
while (!pck_received) {
|
||||
int bytes = recv(sock, &buf->ptr[len], buf->len - len, NULL);
|
||||
if (bytes < 0)
|
||||
if (bytes < 0) // si recv() retourne -1; ça veut dire qu'il y a plus rien a lire.
|
||||
return lsPck;
|
||||
len += bytes;
|
||||
// TODO: Voir si on trouve un footer (5 '\0' d'affilee).
|
||||
|
Loading…
x
Reference in New Issue
Block a user