我的连接CAsyncsocket连接为什么不正确?
hbd 2000-08-19 08:24:00 client :
AfxSocketInit();
CAsyncSocket m_sockRecv;
AfxSocketInit();
if( !m_sockRecv.Create(0,SOCK_STREAM,FD_CONNECT)){
AfxMessageBox("ERRR IN CREATE!");
}
if (!m_sockRecv.Connect("127.0.0.1",6802))
AfxMessageBox("ERRR IN Connect!");
int error = m_sockRecv.GetLastError() // error = 10035
server:
AfxSocketInit();
CAsyncSocket sockListen,m_sockSend;
sockListen.Create(6802,SOCK_STREAM,FD_ACCEPT);
sockListen.Bind(6802,"127.0.0.1");
sockListen.Listen(5);
sockListen.Accept(m_sockSend);