70 lines
1.1 KiB
C++
70 lines
1.1 KiB
C++
#include "StdAfx.h"
|
|
#include ".\user.h"
|
|
#include "PacketHandler.h"
|
|
#include "TempUser.h"
|
|
|
|
#include "UserManager.h"
|
|
|
|
|
|
User::User(void)
|
|
{
|
|
ZeroMemory( m_szID, MAX_USERID_SIZE+1 );
|
|
ZeroMemory( m_szPassword, MAX_PASSWORD_SIZE+1 );
|
|
m_eGrade = USER_GRADE_NORMAL;
|
|
}
|
|
|
|
User::~User(void)
|
|
{
|
|
}
|
|
|
|
VOID User::Init()
|
|
{
|
|
UserSession::Init();
|
|
|
|
ZeroMemory( m_szID, MAX_USERID_SIZE+1 );
|
|
ZeroMemory( m_szPassword, MAX_PASSWORD_SIZE+1 );
|
|
m_eGrade = USER_GRADE_NORMAL;
|
|
}
|
|
|
|
VOID User::SetID( const TCHAR* pszID )
|
|
{
|
|
strncpy( m_szID, pszID, MAX_USERID_SIZE );
|
|
m_szID[MAX_USERID_SIZE] = '0';
|
|
}
|
|
|
|
VOID User::SetPassword( const TCHAR* pszPassword )
|
|
{
|
|
strncpy( m_szPassword, pszPassword, MAX_PASSWORD_SIZE );
|
|
m_szPassword[MAX_PASSWORD_SIZE] = '0';
|
|
}
|
|
|
|
VOID User::OnRecv( BYTE * pMsg, WORD wSize )
|
|
{
|
|
if( !pMsg ) return;
|
|
|
|
//매니저에서 올수도 있고, Agent에서 올수도 있다.
|
|
PacketHandler::Instance()->ParserPacket_SM( this, (MSG_BASE*)pMsg, wSize );
|
|
}
|
|
|
|
int User::SendPacket( MSG_BASE * pMsg, WORD wSize )
|
|
{
|
|
return UserSession::SendPacket( pMsg, wSize );
|
|
}
|
|
|
|
VOID User::OnAccept( DWORD dwNetworkIndex )
|
|
{
|
|
DISPMSG( "User::OnAccept() 유저 접속\n" );
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|