摘要
讨论了网络编程的基本模型和工作原理,对面向连接的流式套接字和无连接的数据报套接字两种通信模式进行了比较,分析了Windows套接字编程通常使用异步选择机制的原因。通过聊天室程序的编写,用Visual C++给出了无连接的数据报套接字编写网络异步通信程序的实现过程。
This article discusses the basic principles of standard network programming, and compares the two communication models between connection-oriented sockets (SOCK_ STREAM) and connectionless-oriented sockets(SOCK_DERAM). This paper analyses the reasons that windows sockets programming adopts asynchronous selection mechanism. Through an example of chat program, the details are given for implementation process of network asynchronous communication programming based on SOCK_DGRAM in VC++
出处
《安徽广播电视大学学报》
2009年第1期120-122,共3页
Journal of Anhui Radio & TV University
关键词
SOCKETS
网络编程
异步通信
Sockets
network programming
asynchronous communication