本文整理汇总了C++中CClientSocket::DisconnectToServer方法的典型用法代码示例。如果您正苦于以下问题:C++ CClientSocket::DisconnectToServer方法的具体用法?C++ CClientSocket::DisconnectToServer怎么用?C++ CClientSocket::DisconnectToServer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CClientSocket
的用法示例。
在下文中一共展示了CClientSocket::DisconnectToServer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSocketMessageRecieve
//.........这里部分代码省略.........
case SM_NEWID_SUCCESS:
{
m_Progress = PRG_LOGIN;
m_UserState = LGM_INPUT_ID;
ZeroMemory(g_xChatEditBox.m_szInputMsg,sizeof(g_xChatEditBox.m_szInputMsg));
SetFocusAfter();
SetErrorMessage(NEW_ACCOUNT_WELL_DONE,m_szErrorMsg);
m_xMsgBox.ShowMessageBox(m_szErrorMsg, 1, _WNDIMGINDX_MSGBOX1);
break;
}
// New ID Create Fail
case SM_NEWID_FAIL:
{
m_Progress = PRG_NEW_ACCOUNT;
switch(tdm.nRecog)
{
case 1:
nMsgNum=ERROR_STR_NEW_ACCOUNT_1;
break;
case 2:
nMsgNum=ERROR_STR_NEW_ACCOUNT_6;
break;
case 3:
nMsgNum=ERROR_STR_NEW_ACCOUNT_7;
break;
}
SetErrorMessage(nMsgNum,m_szErrorMsg);
m_xMsgBox.ShowMessageBox(m_szErrorMsg, 1, _WNDIMGINDX_MSGBOX1);
break;
}
// Change Password Success
case SM_CHGPASSWD_SUCCESS:
{
m_Progress = PRG_LOGIN;
break;
}
// Change Passsword Fail
case SM_CHGPASSWD_FAIL:
{
m_Progress = PRG_CHANGE_PASS;
break;
}
case SM_SELECTSERVER_OK:
{
char szDecodeMsg[256];
char *pszIP = szDecodeMsg, *pszPort, *pszIdenty;
ZeroMemory(szDecodeMsg, sizeof(szDecodeMsg));
fnDecode6BitBuf((pszMsg + DEFBLOCKSIZE), szDecodeMsg, sizeof(szDecodeMsg));
if (pszPort = strchr(szDecodeMsg, '/')){
*pszPort = '\0';
pszPort++;
if (pszIdenty = strchr(pszPort, '/')){
*pszIdenty = '\0';
pszIdenty++;
strcpy(g_szServerIP, pszIP);
g_nServerPort = atoi(pszPort);
m_nAnimationCounter = 0;
g_nCertifyCode = tdm.nRecog;
g_xClientSocket.DisconnectToServer();
Clear(RGB(0,0,0));
m_Progress = PRG_TO_SELECT_CHR;
}
}
break;
}
// Connection Lost(close Connection)
case SM_OUTOFCONNECTION:
{
m_Progress = PRG_QUIT; // Quit for Some Reason 프로그램 종료
SendMessage(g_xMainWnd.GetSafehWnd(), WM_DESTROY, NULL, NULL);
break;
}
}
/*
switch(tdm.wIdent)
{
case SM_NEEDUPDATE_ACCOUNT: // Need to account update
m_Progress = PRG_NEED_ACCOUNT_CHANGE; // Need Account change
break;
case SM_UPDATEID_SUCCESS: // account update success
m_Progress = PRG_LOGIN; // Login
break;
case SM_UPDATEID_FAIL: // account update Fail
m_Progress = PRG_NEED_ACCOUNT_CHANGE; // Login
break;
}
*/
}