MFC中提供socket通信功能的类有几个?类名是什么?用示意图简述socket的TCP(有连接的)

 我来答
匿名用户
2013-07-21
展开全部
1)应该查msdn。也就是两个 class CSocket : public CAsyncSocket
2) 示意图这种查tcp/ip的经典书就可以了。是指三次握手,还是指什么?链接 http://fatjames.extjs.org.cn/category/tcpip可以看一下。不过看《Unix网络编程》或者《tcp/ip详解》更好
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
匿名用户
2013-07-21
展开全部
The two MFC Windows Sockets programming models are supported by the following classes:CAsyncSocketThis class encapsulates the Windows Sockets API. CAsyncSocket is for programmers who know network programming and want the flexibility of programming directly to the sockets API but also want the convenience of callback functions for notification of network events. Other than packaging sockets in object-oriented form for use in C++, the only additional abstraction this class supplies is converting certain socket-related Windows messages into callbacks. For more information, see Windows Sockets: Socket Notifications.CSocketThis class, derived from CAsyncSocket, supplies a higher level abstraction for working with sockets through an MFC CArchive object. Using a socket with an archive greatly resembles using MFC's file serialization protocol. This makes it easier to use than the CAsyncSocket model. CSocket inherits many member functions from CAsyncSocket that encapsulate Windows Sockets APIs; you will have to use some of these functions and understand sockets programming generally. But CSocket manages many aspects of the communication that you would have to do yourself using either the raw API or classCAsyncSocket. Most importantly, CSocket provides blocking (with background processing of Windows messages), which is essential to the synchronous operation of CArchive.Creating and using CSocket and CAsyncSocket objects is described in Windows Sockets: Using Sockets with Archives and Windows Sockets: Using Class CAsyncSocket.
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式