MY-SOCKET

所属分类:Windows编程
开发工具:Visual C++
文件大小:3835KB
下载次数:4
上传日期:2015-12-17 10:19:55
上 传 者zenglisuyan
说明:  MFC中各个Dialog之间的传值、添加会话框以及Listcontrl的使用。     并从父窗体弹出的子窗体回弹到原来的父窗体,只需要使用CDialog::onOK() 方法即可,因为模态弹出的对话框具有阻塞性,若是使用新定义的对象再进行DoModal() 方法,反而会出错,即会又重新出现了新的窗体,虽然是一样的窗体,但是内容和值都不再存在。     Updatedata()方法可以实现窗体和函数内参数值的传递。     进行CString.Format() 函数的学习,参照C语言,学习 d, c和 s等的使用 Socket通信分为客户端和服务器端,我们这次要做的就是基于MFC的CSocket类的,因为诸如像线程的开辟、调度、回收和释放等工作,MFC都帮我们封装好了,可以不用我们去管;     2.SQL Server所用的端口号应该避开应用程序会占用的端口号,并且服务器端的端口号是指定的,而客户端接收消息的端口号是随意分配的;     3.在服务器端Listen以后,客户端才会有Connect,然后服务器的onaccept接收后会去建立连接,在服务器端要保存客户端的一个Socket对象,还有一点就是onaccept不在主窗体中写了,而是在服务器中做,相当于一个while(1)的死循环,反复不断的判断有没有建立连接。
(Dialog between the transfer value of each MFC, add the Session box and Listcontrl use. And the pop-up form the parent subform rebound to its original parent form, just use CDialog :: onOK () method can, because modal dialog box that has obstructive, if the use of the new definition of the object then DoModal () method, but to be wrong, that will reappear a new form, though the form is the same, but the content and the values ​ ​ are no longer present. Updatedata () method can achieve transfer form and function internal reference value. Conduct CString.Format () function study, referring to the C language, learning d, c and s like to use Socket Communications is divided into client and server side, this time we have to do is MFC-based CSocket class, because such like thread open, scheduling, recovery and release work, MFC have helped us a good package, can not we to manage 2.SQL Server port number should be used to avoid the application takes the port number and t)

文件列表:
MY SOCKET\chatClient\chatClient.aps (20240, 2014-08-07)
MY SOCKET\chatClient\chatClient.clw (939, 2014-08-07)
MY SOCKET\chatClient\chatClient.cpp (2213, 2014-08-25)
MY SOCKET\chatClient\chatClient.dsp (4363, 2014-08-25)
MY SOCKET\chatClient\chatClient.dsw (543, 2014-08-25)
MY SOCKET\chatClient\chatClient.h (1368, 2014-08-25)
MY SOCKET\chatClient\chatClient.ncb (82944, 2014-08-08)
MY SOCKET\chatClient\chatClient.opt (53760, 2014-08-08)
MY SOCKET\chatClient\chatClient.plg (889, 2014-08-04)
MY SOCKET\chatClient\chatClient.rc (4702, 2014-08-25)
MY SOCKET\chatClient\chatClientDlg.cpp (3882, 2014-07-31)
MY SOCKET\chatClient\chatClientDlg.h (1456, 2014-08-25)
MY SOCKET\chatClient\ChatSocket.cpp (1004, 2014-08-25)
MY SOCKET\chatClient\ChatSocket.h (1261, 2014-08-25)
MY SOCKET\chatClient\Debug\chatClient.exe (106557, 2014-08-04)
MY SOCKET\chatClient\Debug\chatClient.ilk (216664, 2014-08-04)
MY SOCKET\chatClient\Debug\chatClient.obj (14032, 2014-08-25)
MY SOCKET\chatClient\Debug\chatClient.pch (5582120, 2014-08-25)
MY SOCKET\chatClient\Debug\chatClient.pdb (361472, 2014-08-04)
MY SOCKET\chatClient\Debug\chatClient.res (2264, 2014-08-04)
MY SOCKET\chatClient\Debug\chatClientDlg.obj (20401, 2014-08-25)
MY SOCKET\chatClient\Debug\ChatSocket.obj (6153, 2014-08-25)
MY SOCKET\chatClient\Debug\StdAfx.obj (106490, 2014-08-25)
MY SOCKET\chatClient\Debug\vc60.idb (214016, 2014-08-04)
MY SOCKET\chatClient\Debug\vc60.pdb (364544, 2014-08-25)
MY SOCKET\chatClient\res\chatClient.ico (1078, 2014-08-25)
MY SOCKET\chatClient\res\chatClient.rc2 (402, 2014-08-25)
MY SOCKET\chatClient\Resource.h (687, 2014-08-25)
MY SOCKET\chatClient\StdAfx.cpp (212, 2014-08-25)
MY SOCKET\chatClient\StdAfx.h (1102, 2014-08-25)
MY SOCKET\chatServer\chatServer.aps (20216, 2014-08-07)
MY SOCKET\chatServer\chatServer.clw (1105, 2014-08-07)
MY SOCKET\chatServer\chatServer.cpp (2213, 2014-08-25)
MY SOCKET\chatServer\chatServer.dsp (4499, 2014-08-25)
MY SOCKET\chatServer\chatServer.dsw (750, 2014-08-25)
MY SOCKET\chatServer\chatServer.h (1368, 2014-08-25)
MY SOCKET\chatServer\chatServer.ncb (132096, 2014-08-07)
MY SOCKET\chatServer\chatServer.opt (412160, 2014-08-07)
MY SOCKET\chatServer\chatServer.plg (254, 2014-08-04)
... ...

近期下载者

相关文件


收藏者