mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-02-16 02:30:54 +00:00
Support of 1Gps+ internet
This commit is contained in:
@@ -24,11 +24,11 @@ struct VData{
|
||||
class Client {
|
||||
private:
|
||||
std::set<std::unique_ptr<VData>> VehicleData; //ID and Data;
|
||||
std::string Name = Sec("Unknown Client");
|
||||
std::string Name = "Unknown Client";
|
||||
SOCKET SOCK[2]{SOCKET(-1)};
|
||||
sockaddr_in UDPADDR;
|
||||
std::string Role;
|
||||
std::string DID;
|
||||
SOCKET TCPSOCK;
|
||||
int Status = 0;
|
||||
int ID = -1;
|
||||
public:
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
void SetRoles(const std::string& role);
|
||||
std::string GetCarData(int ident);
|
||||
void SetUDPAddr(sockaddr_in Addr);
|
||||
void SetDownSock(SOCKET CSock);
|
||||
void SetTCPSock(SOCKET CSock);
|
||||
void SetStatus(int status);
|
||||
void DeleteCar(int ident);
|
||||
@@ -48,6 +49,7 @@ public:
|
||||
std::string GetName();
|
||||
bool isSynced = false;
|
||||
bool isGuest = false;
|
||||
SOCKET GetDownSock();
|
||||
SOCKET GetTCPSock();
|
||||
void SetID(int ID);
|
||||
int GetOpenCarID();
|
||||
|
||||
@@ -72,6 +72,6 @@ public:
|
||||
void SetStopThread(bool StopThread) { _StopThread = StopThread; }
|
||||
bool GetStopThread() const { return _StopThread; }
|
||||
};
|
||||
int CallFunction(Lua* lua, const std::string& FuncName, std::shared_ptr<LuaArg> args);
|
||||
int TriggerLuaEvent(const std::string& Event, bool local, Lua* Caller, std::shared_ptr<LuaArg> arg, bool Wait);
|
||||
std::any CallFunction(Lua* lua, const std::string& FuncName, std::shared_ptr<LuaArg> args);
|
||||
std::any TriggerLuaEvent(const std::string& Event, bool local, Lua* Caller, std::shared_ptr<LuaArg> arg, bool Wait);
|
||||
extern std::set<std::unique_ptr<Lua>> PluginEngine;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
void TCPServerMain();
|
||||
void UpdatePlayers();
|
||||
void OnConnect(Client* c);
|
||||
void InitClient(Client* c);
|
||||
void TCPClient(Client* c);
|
||||
std::string TCPRcv(Client* c);
|
||||
void SyncResources(Client* c);
|
||||
[[noreturn]] void UDPServerMain();
|
||||
@@ -16,5 +16,6 @@ void UDPSend(Client* c, std::string Data);
|
||||
void SendLarge(Client* c, std::string Data);
|
||||
bool TCPSend(Client* c, const std::string& Data);
|
||||
void GParser(Client* c, const std::string& Packet);
|
||||
std::string StaticReason(bool Set,const std::string& R);
|
||||
void Respond(Client* c, const std::string& MSG, bool Rel);
|
||||
void SendToAll(Client* c, const std::string& Data, bool Self, bool Rel);
|
||||
|
||||
Reference in New Issue
Block a user