用CObject类实现简单的网络聊天  

REALIZE ON SIMPLE NETWORK CHAT WITH COBJECT DASS

在线阅读下载全文

作  者:张菽伦[1,2] 

机构地区:[1]内蒙古师范大学 [2]呼市34中,呼和浩特010051

出  处:《内蒙古农业大学学报(自然科学版)》2010年第1期248-252,共5页Journal of Inner Mongolia Agricultural University(Natural Science Edition)

摘  要:虽然利用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.

关 键 词:网络编程 CSOCKET类 CObject类 

分 类 号:TP311.52[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象