mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Network cleanup (#6302)
* Cleanup network headers * Move peerhandler to a specific header to reduce compilation times * Move socket.cpp/h to network folder * More work * Network code cleanups * Move socket.{cpp,h} to network folder * Move Address object to network/address.{cpp,h} * Move network exceptions to network/networkexceptions.h * Client: use unique_ptr for Connection * Server/ClientIface: use shared_ptr for Connection * Format fixes * Remove socket.cpp socket.h from clang-format whitelist * Also fix NetworkPacket code style & make it under clang-format
This commit is contained in:
parent
928609c8bd
commit
c7160cb629
27 changed files with 1059 additions and 924 deletions
|
@ -418,7 +418,7 @@ public:
|
|||
|
||||
friend class Server;
|
||||
|
||||
ClientInterface(con::Connection* con);
|
||||
ClientInterface(const std::shared_ptr<con::Connection> &con);
|
||||
~ClientInterface();
|
||||
|
||||
/* run sync step */
|
||||
|
@ -487,7 +487,7 @@ private:
|
|||
void UpdatePlayerList();
|
||||
|
||||
// Connection
|
||||
con::Connection* m_con;
|
||||
std::shared_ptr<con::Connection> m_con;
|
||||
std::mutex m_clients_mutex;
|
||||
// Connected clients (behind the con mutex)
|
||||
RemoteClientMap m_clients;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue