DragonNest/Server/DNLogServer/DNConnectionManager.cpp
2024-12-20 16:56:44 +08:00

32 lines
1.2 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "StdAfx.h"
#include "DNConnectionManager.h"
#include "DNConnection.h"
#include "Util.h"
CDNConnectionManager* g_pConnectionManager = NULL;
CDNConnectionManager::CDNConnectionManager(void): CConnectionManager()
{
}
CDNConnectionManager::~CDNConnectionManager(void)
{
}
CConnection* CDNConnectionManager::AddConnection(const char *pIp, const USHORT nPort)
{
CDNConnection *pCon = new CDNConnection;
if (!pCon) return NULL;
// 그냥 마스터 커넥션 ID발행..
pCon->SetSessionID(g_IDGenerator.GetMasterConnectionID());
pCon->SetIp(pIp);
pCon->SetPort(nPort);
PushConnection(pCon);
return pCon;
}