mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-07-24 07:30:42 +00:00
Fix multiple small issues :)
This commit is contained in:
@@ -264,7 +264,7 @@ void TCPServerMain(){
|
||||
#else // unix
|
||||
// wondering why we need slightly different implementations of this?
|
||||
// ask ms.
|
||||
SOCKET client, Listener = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
|
||||
SOCKET client = -1, Listener = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
|
||||
sockaddr_in addr{};
|
||||
addr.sin_addr.s_addr = INADDR_ANY;
|
||||
addr.sin_family = AF_INET;
|
||||
|
||||
@@ -184,7 +184,6 @@ void GlobalParser(Client*c, const std::string& Pack){
|
||||
SendToAll(c,Packet,false,false);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (Code) {
|
||||
case 'P': // initial connection
|
||||
#ifdef DEBUG
|
||||
|
||||
@@ -70,7 +70,7 @@ void TCPRcv(Client*c){
|
||||
return;
|
||||
}
|
||||
BytesRcv += Temp;
|
||||
}while(BytesRcv < sizeof(Header));
|
||||
}while(size_t(BytesRcv) < sizeof(Header));
|
||||
memcpy(&Header,&Data[0],sizeof(Header));
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
Reference in New Issue
Block a user