📄 d116.bmp.txt
字号:
case WSAEISCONN:
result_"The socket is already connected.";
break;
case WSAEMFILE:
result="No more ffle descriptors are available";
break;
case WSAENETUNREACH:
result="The network cannot be reached from this host at this time";
break;
case WSAENOBUFS:
result="No buffer space is available. The socket cannot be connected";
break;
case WSAENOTSOCK:
result="The descnptor is not a socket";
break;
case WSAETIMEDOUT:
result="Attempt to connect timed out without establishing a connection";
break;
case WSAEWOULDBLOCK:
result="The socket is marked as nonblocking and the connection cannot be completed
immediately. ";
break;
default:
result="unknown error";
}
retum result,
11)瀑加CChatClient类接收连接函数OnReceive()。
l/6
void CChatCl:ient::OnReceive(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
CSocket::OnReceive(nErrorCode);
do
{
CMessg temp;
temp. S erialize(*m_aS es sionln);
m_dlg->m_sMsgList+=temp.m_strText;
m_dlg->SetDlgltemText(IDC_SHOWMSG,m_dlg->m_sMsgList);
int linenum=《CEdit *)(m_dlg->GetDlgItem(IDC_SHOWMSG》)->GetLineCount0;
《CEdit *)(m_dlg->GetDlgltem(IDC_SHOWMSG》)->LineScroll(linenum);
if( !m_dlg->m_bClient)
{
for(POSITION pos=m_dlg->m. connectionList.GetHeadPosition();pos !=NULL;)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -