Socket在所有网络操作系统和网络应用程序中都是必不可少的,它是网络通信应用程序对应的进程和网络协议之间的接口。介绍Linux操作系统下基于TCP/IP协议Socket的通信模式,提出一种多进程-I/O复用的并发技术,以提高服务器的工作效率,并用面向对象的方法实现该算法,最后用实例检验其正确性。
In all network operating systems and network applications,the socket is essential.It is the interface between the processes corresponding to network communication applications and the network protocols.In this article we introduce a TCP/IP protocol-based socket communication mode in Linux operating system,present a multi-process-I/O multiplexing concurrent technology to improve server’s operation efficiency,and use an object-oriented approach to implement the algorithm.Finally,an example is used to examine its correctness.