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

基于TCP下多线程WINSOCK编程
引用本文:张磊,王贞化.基于TCP下多线程WINSOCK编程[J].科技广场,2006(7):51-53.
作者姓名:张磊  王贞化
作者单位:1. 苏州大学计算机科学与技术学院,苏州,215006;河南师范大学计算机与信息技术学院,新乡,453007
2. 河南师范大学计算机与信息技术学院,新乡,453007
摘    要:本文首先分析了在WINSOCK下具体网络编程过程中的实际需求,利用线程创建函数编写了服务器对多个客户同时响应的例子,即在每一个客户提出请求后,主程序调用CreateThread子函数创建一个线程去服务客户,而主程序返回去等待下一个客户请求,从而实现多个客户与服务器间的通信。

关 键 词:套接字  传输控制协议  多线程  客户/服务器
文章编号:1670-4792-(2006)7-0030-03

Multi-thread Winsock Programming Based on TCP
Zhang Lei,Wang Zhenhua.Multi-thread Winsock Programming Based on TCP[J].Science Mosaic,2006(7):51-53.
Authors:Zhang Lei  Wang Zhenhua
Abstract:Firstly, this paper analysis actual demands in concrete network programming process at Winsock, compiles the example that the server program responds to many customers at the same time by using the CreateThread function .Namely proposed the request after each customer, the master program adjusts the CreateThread sub- function to found a thread to serve each customer. Then the master program returns to wait next customer to request, and so realize correspondence between many customers and the server.
Keywords:Sockets  TCP  Multi-thread  Client/Server  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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