mirror of
https://github.com/EQEmu/Server.git
synced 2026-12-04 11:12:20 +00:00
[Code] UCSConnection Global to Singleton Cleanup (#4937)
Co-authored-by: Chris Miles <akkadius1@gmail.com>
This commit is contained in:
1 parent
654764685a
commit
1e6a4dac78
7 files changed
+19
-13
No files matched your search
@@ -19,6 +19,12 @@ public:
|
||||
const std::shared_ptr<EQ::Net::ServertalkServerConnection> &GetConnection() const;
|
||||
inline bool IsConnected() const { return connection->Handle() ? connection->Handle()->IsConnected() : false; }
|
||||
|
||||
static UCSConnection* Instance()
|
||||
{
|
||||
static UCSConnection instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
private:
|
||||
inline std::string GetIP() const { return (connection && connection->Handle()) ? connection->Handle()->RemoteIP() : 0; }
|
||||
std::shared_ptr<EQ::Net::ServertalkServerConnection> connection;
|
||||
|
||||
Reference in new issue
Block a user