summaryrefslogtreecommitdiff
path: root/src/clientiface.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-24 08:28:54 +0200
committerGitHub <noreply@github.com>2017-08-24 08:28:54 +0200
commitc7160cb629086df2a32c7dcf4faed4761ec4393e (patch)
tree63670a536ce95f6a3a1ce09bf2f2f65d1bec5214 /src/clientiface.h
parent928609c8bd9d4e6129ab244214bd5c54d000b737 (diff)
downloadminetest-c7160cb629086df2a32c7dcf4faed4761ec4393e.tar.gz
minetest-c7160cb629086df2a32c7dcf4faed4761ec4393e.tar.bz2
minetest-c7160cb629086df2a32c7dcf4faed4761ec4393e.zip
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
Diffstat (limited to 'src/clientiface.h')
-rw-r--r--src/clientiface.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/clientiface.h b/src/clientiface.h
index 3ee09317d..4d61ae74e 100644
--- a/src/clientiface.h
+++ b/src/clientiface.h
@@ -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;