setup louche en console

This commit is contained in:
MarcEricMartel
2023-10-18 09:59:34 -04:00
parent 2cb7d4c776
commit 0e7b8973e7
4 changed files with 27 additions and 25 deletions

View File

@@ -69,7 +69,7 @@ int Connector::Connect(char* srv_addr, std::string name) {
buf = new char[150] {0};
buflen = 150;
int rpack = 0;
int errors = 0;
while (rpack < 2) {
recv(m_sock_tcp, buf, buflen, 0);
@@ -89,9 +89,12 @@ int Connector::Connect(char* srv_addr, std::string name) {
++rpack;
break;
default:
std::cout << "Packet invalide." << std::endl;
++errors;
//std::cout << "Packet invalide." << std::endl;
break;
}
if (errors > 100)
return 1;
}
return 0;
}