文件名称:MY-SOCKET
- 所属分类:
- Internet/网络编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2015-12-17
- 文件大小:
- 3.75mb
- 下载次数:
- 0次
- 提 供 者:
- 曾**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
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
并从父窗体弹出的子窗体回弹到原来的父窗体,只需要使用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
.........\..........\chatClient.clw
.........\..........\chatClient.cpp
.........\..........\chatClient.dsp
.........\..........\chatClient.dsw
.........\..........\chatClient.h
.........\..........\chatClient.ncb
.........\..........\chatClient.opt
.........\..........\chatClient.plg
.........\..........\chatClient.rc
.........\..........\chatClientDlg.cpp
.........\..........\chatClientDlg.h
.........\..........\ChatSocket.cpp
.........\..........\ChatSocket.h
.........\..........\Debug\chatClient.exe
.........\..........\.....\chatClient.ilk
.........\..........\.....\chatClient.obj
.........\..........\.....\chatClient.pch
.........\..........\.....\chatClient.pdb
.........\..........\.....\chatClient.res
.........\..........\.....\chatClientDlg.obj
.........\..........\.....\ChatSocket.obj
.........\..........\.....\StdAfx.obj
.........\..........\.....\vc60.idb
.........\..........\.....\vc60.pdb
.........\..........\ReadMe.txt
.........\..........\res\chatClient.ico
.........\..........\...\chatClient.rc2
.........\..........\Resource.h
.........\..........\StdAfx.cpp
.........\..........\StdAfx.h
.........\....Server\chatServer.aps
.........\..........\chatServer.clw
.........\..........\chatServer.cpp
.........\..........\chatServer.dsp
.........\..........\chatServer.dsw
.........\..........\chatServer.h
.........\..........\chatServer.ncb
.........\..........\chatServer.opt
.........\..........\chatServer.plg
.........\..........\chatServer.rc
.........\..........\chatServerDlg.cpp
.........\..........\chatServerDlg.h
.........\..........\ChatSocket.cpp
.........\..........\ChatSocket.h
.........\..........\Debug\chatServer.exe
.........\..........\.....\chatServer.ilk
.........\..........\.....\chatServer.obj
.........\..........\.....\chatServer.pch
.........\..........\.....\chatServer.pdb
.........\..........\.....\chatServer.res
.........\..........\.....\chatServerDlg.obj
.........\..........\.....\ChatSocket.obj
.........\..........\.....\ServerSocket.obj
.........\..........\.....\StdAfx.obj
.........\..........\.....\vc60.idb
.........\..........\.....\vc60.pdb
.........\..........\ReadMe.txt
.........\..........\res\chatServer.ico
.........\..........\...\chatServer.rc2
.........\..........\Resource.h
.........\..........\ServerSocket.cpp
.........\..........\ServerSocket.h
.........\..........\StdAfx.cpp
.........\..........\StdAfx.h
.........\....Client\Debug
.........\..........\res
.........\....Server\Debug
.........\..........\res
.........\chatClient
.........\chatServer
MY SOCKET