⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d113.bmp.txt

📁 Visual C++通信编程工程实例精解(附盘)
💻 TXT
字号:
l
else
{
msg->Senalize(*m_aS essionOut);
m_aSessionOut->Flush0;
retum TRUE;
//对方关闭了连接
m_bClose=true;
CloseSocket0;
m_dlg->CloseSessionSocket0;
return FALSE;
7)添加CChatClient类关闭连接函数CloseSocket0。
       void CChatClient::CloseSocket()
         {
if(m_aSessionln)
                   {
                     delete m_aSessionln;
m_aSessionIn=NULL;
                   }
if(m_aSessionOut)
                   {
                     delete m_aSessionOut;
m_aSessionOut=NULL;
if(m_sfSocketFile)
                   {      .
                       delete m_aSessionOut;
m_sfSocketFile=NULL;
                 }
 Close();
m_blnit=false;
m_bClose=true;
          }
8)添加 CChatClient类获取主机名函数 GetLocalHostName O。
int CChatClient::GetLocaIHostName(CString &sHostName)
{
        char szHostNamel256J;
        int nRetCode;
                              nRetCode=gethostname(szHostN ame,sizeof(szHostName》;
               if(nRetCode !:=:0)
          {
//3

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -