首页 | 本学科首页   官方微博 | 高级检索  
     

Linux下基于TCP的预先派生子进程服务器的Socket编程
引用本文:和家强,刘彦隆.Linux下基于TCP的预先派生子进程服务器的Socket编程[J].电子设计工程,2011,19(3):143-146,149.
作者姓名:和家强  刘彦隆
作者单位:太原理工大学,信息工程学院,山西,太原,030024
摘    要:描述了客户/服务器模型以及常见的服务器类型——基于TCP的并发服务器。在一个基于TCP回射服务器程序的基础上,结合实际Web应用中的多进程服务器模型,考虑到原有的客户/服务器交互存在的问题,改进了客户程序,设计了实现并发功能的客户程序、并发服务器以及预先派生子进程服务器。在装有Linux的PC上分别进行客户程序和服务器程序的测试。实验结果表明:在与并发客户的TCP交互中,与并发服务器相比,预先派生子进程服务器能够及时处理新的客户连接,且响应时间减小到并发服务器的三分之一,达到了对服务器性能优化的目的。

关 键 词:Socket  TCP  预先派生子进程  多进程

Socket programming of preforking server based on TCP in Linux
HE Jia-qiang,LIU Yan-long.Socket programming of preforking server based on TCP in Linux[J].Electronic Design Engineering,2011,19(3):143-146,149.
Authors:HE Jia-qiang  LIU Yan-long
Affiliation:(College of Information Engineering,Taiyuan University of Technology,Taiyuan 030024,China)
Abstract:This paper described the C/S model and the common server type-TCP-based concurrent server.In a TCP-based echo server program,combining with the practical model of multi-process server in Web applications,and considering the problems of original C/S interaction process,it improved the client program and designed the concurrent client,concurrent server and pre-forking server.Client and server programs ran on PCs with Linux respectively.The results showed that in the interaction with the TCP-based client,compared with the concurrent server,the preforking server processed new client connections timely and the response time of it reduced to one third of its counterpart,and this realized the optimization of the server’s performance.
Keywords:Socket  TCP  preforking  multi-process
本文献已被 CNKI 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号