请下载论文,论文或程序为doc或rar格式,只上传部分目录查看,如果需要此论文或程序,请点击-下载论文,下载需要资料或是论文。简易代理服务器设计-论文和程序及源代码
jianyidailifuwuqisheji-lunwenhechengxujiyuandaima,因文件夹或是目录太多,只读取5个文件显示,需要就下载参考
包括目录名称:
简易代理服务器设计-论文和程序及源代码 - 2 文件数, 0 目录数.
简易代理服务器设计.doc
..\简易代理服务器设计.doc
简易代理服务器设计.rar
..\简易代理服务器设计.rar
览器和Web服务器之间的一台服务器,它的功能是代理网络用户去取得网络信息。它的工作原理是,接收客户机的数据连接请求,并将请求传给Web服务器;再从Web服务器接收返回的数据,最后把数据传给客户端显示。本论文讲述的是关于一个简单的代理服务器的实现,在实现中采用客户机/服务器结构模型开发应用程序,基于一般的访问浏览速度慢、效率底、安全功能不强等原因,将以简单、合理、有效为原则;为了方便分析和设计,系统设计中设置不同的状态量用于标识客户机、代理服务器及服务器间的联结状态。在保证系统基本功能的同时,使用多线程机制使得代理系统有更好的延续性。此代理系统具有简单,易用,网络化等优点,能够完成一般的HTTP访问代理服务。
关键词:客户机/服务器结构;多线程;套接字;代理服务器
The Design of Simple Proxy Server
Abstract
The proxy server is a server which situates between the browser and a Web server. It's principle of work is, it receives the connection request from the client, and hands down the requested to the Web server, then receives data which is returned from the Web server., finally hands it down the data to the client. In the realization, it adopts Client/Server structural model to develop application. Because of browse speed slow, low efficient and not safe enough, it takes simple, reasonable and effective as the principle. In the system design, it sets different states to identify client, proxy server and the connective state between servers. When the system's basic function are guaranteed, it use the multithreading to enable the proxy server to have a better continuous feature. This proxy system has the merit such as simple, easy to use and so on, and it can complete the proxy of general HTTP visit.
Key words: Client / Server architecture;Multithreading;Socket;Proxy Server
目 录
论文总页数:20页
1 引言 1
1.1 课题背景 1
1.2 本课题研究的意义 1
1.3 本课题的研究方法 1
2 理论基础 2
2.1 代理服务器 2
2.2 目前的代理服务技术 3
2.3 SOCKET 面向连接的编程模型 4
2.4 WINSOCK库 5
2.4.1 winsock的寻址方式 5
2.4.2 字节顺序 6
2.5 系统基本套接字调用 6
2.5.1 创建和关闭套接字-socket()和closesocket() 6
2.5.2 指定本地地址-bind() 6
2.5.3 设置监听状态-listen() 6
2.5.4 建立套接字连接-connect()和accept() 6
2.5.5 收发数据-send()和recv() 7
3 设计方案 7
3.1 基本函数设计 7
3.2 多线程流程 8
4 服务器的实现 8
4.1 环境创建 8
4.2 功能实现 9
4.2.1 数据变量定义 9
4.2.2 启动代理服务器 10
4.2.3 请求处理过程 11
4.2.4 请求响应 13
4.2.5 关闭服务器 15
4.2.6 控制主函数 15
5 测试结果 15
结 论 17
参考文献 18
致 谢 19
声 明 20
1 引言
1.1 课题背景
普通的因特网访问是一种典型的客户机与服务器结构,而代理服务器将运行于客户机与服务器之间,它作为Internet/Intranet上常用的一种服务器,通常配置在Intranet连接Internet的出口处,主要实现代理传输服务。可以这样认为,代理是双向的。即对于内部网上的用户来说,代理服务器可看作是一个外部网的代理;对于外部网络来说,代理服务器可以看作一个要访问外部网的客户。正是由于代理服务器的这种控制方式,可以使用它提高客户访问外网的效率、节省网络带宽,增