摘要
虽然利用Socket编程是1种典型的网络通信程序设计方法,但是由于其成员函数调用必然是完全阻塞方式的,因此只能用于人工线程中。本文中并没有直接应用MFC提供的CSocket类,而是在CObject类基础上派生1个套接字类,其使用方式为阻塞方式,虽然增加了使用的条件,但可以保证其正常工作,因而不会出现不加控制地使用CSocket对象带来的冲突现象。
Ahhough makeing use of Socket program is a sort of typical network communication program, as a result of its member that Calling Function must be completely obstruction mode, it can only be done in manpower threading. The article does not apply CSocket classes porvided by MFC directly,but derive one Socket classes on the basis of CObject classes, and the usage mode is blocking,although adding the working conditions,it can ensure normal operation. So it can assure that the conflict by uncontrolled using CSocket will not happen.
出处
《内蒙古农业大学学报(自然科学版)》
CAS
北大核心
2010年第1期248-252,共5页
Journal of Inner Mongolia Agricultural University(Natural Science Edition)