›› 2012, Vol. 25 ›› Issue (3): 59-.

• 论文 • 上一篇    下一篇

Windows平台下的网络异步通讯编程技术

杜永锋,刘钊   

  1. (西安电子科技大学 电子工程学院,陕西 西安 710071)
  • 出版日期:2012-03-15 发布日期:2012-03-21
  • 作者简介:杜永锋(1985—),男,硕士研究生。研究方向:嵌入式控制系统,信号检测及信息处理。刘钊(1986—),男,硕士研究生。研究方向:系统集成技术。

Network Asynchronous Communication Programming Techniques Based on Windows

 DU Yong-Feng, LIU Zhao   

  1. (School of Electronic Engineering,Xidian University,Xi'an 710071,China)
  • Online:2012-03-15 Published:2012-03-21

摘要:

介绍了在TCP/IP网络中WinSock网络编程的基本流程及WinSock编程常用的两种类,集中探讨了MFC提供的异步非阻塞类CAsyncSocket的特点,包括类对象的创建、异步选择机制以及对网络事件的响应。以及采用CAsyncSocket类进行网络通信的通信流程,并结合实际开发经验,介绍了使用CAsyncSocket类进行网络编程的基本框架。通过使用可大大提高编程的效率。

关键词: TCP/IP, WinSock, 异步通讯, 非阻塞, CasyncSocket

Abstract:

This paper introduces the basic processes and two common kinds of class of the WinSock network programming in the TCP/IP network and focuses on the features of asynchronous non-blocking class CAsyncSocket which is provided by MFC.The features include the creation of objects,the asynchronous selection mechanism,and the response to network events.Then with practical development experience,this paper introduces the communication process and basic framework of the network communication by using CAsyncSocket class.

Key words: TCP/IP;WinSock;asynchronous communication;non-blocking;CAsyncSocket

中图分类号: 

  • TP393