mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-03 14:26:15 +00:00
Launcher update to 1.63.5
- async tcp buffer - two way encryption on connect - map security fix - DNS Lookup on connect - fixed bug in beamng security
This commit is contained in:
@@ -15,22 +15,20 @@ void TCPSend(const std::string&Data){
|
||||
Terminate = true;
|
||||
return;
|
||||
}
|
||||
int BytesSent = send(TCPSock, Data.c_str(), int(Data.length())+1, 0);
|
||||
if (BytesSent == 0){
|
||||
std::string Send = "\n" + Data.substr(0,Data.find(char(0))) + "\n";
|
||||
size_t Sent = send(TCPSock, Send.c_str(), int(Send.size()), 0);
|
||||
if (Sent == 0){
|
||||
debug(Sec("(TCP) Connection closing..."));
|
||||
Terminate = true;
|
||||
return;
|
||||
}
|
||||
else if (BytesSent < 0) {
|
||||
else if (Sent < 0) {
|
||||
debug(Sec("(TCP) send failed with error: ") + std::to_string(WSAGetLastError()));
|
||||
closesocket(TCPSock);
|
||||
Terminate = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ServerParser(const std::string& Data);
|
||||
void TCPRcv(){
|
||||
char buf[4096];
|
||||
int len = 4096;
|
||||
@@ -51,7 +49,7 @@ void TCPRcv(){
|
||||
Terminate = true;
|
||||
return;
|
||||
}
|
||||
ServerParser(std::string(buf));
|
||||
Handler.Handle(std::string(buf));
|
||||
}
|
||||
|
||||
void SyncResources(SOCKET TCPSock);
|
||||
|
||||
Reference in New Issue
Block a user