文件名称:socket
- 所属分类:
- Internet/网络编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2016-07-06
- 文件大小:
- 9kb
- 下载次数:
- 0次
- 提 供 者:
- y**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
一个常见的使用套接字是为了方便一个分布式的负载系统,例如,一个缓慢的客户端机器可以通过网络和套接字的快速服务器机的计算密集型的请求,这个项目的目标是写一个客户端和一个服务器,一起创建这样的系统。程序流程可能类似于下面的:
客户端将请求一个词从用户通过标准输入输入
1这个字将被传送到服务器上的套接字连接。
2、服务器将检查单词的正确拼写和返回一个响应,该单词拼写正确,或一个响应,该单词拼写错误。
3客户端将显示服务器对用户的响应的格式化结果。例如,一个消息说,“这个词 -拼写正确。”或“单词 -拼写正确。
你的代码的第一步是设计来支持多个客户端,但客户端一次。您保持客户端等待,直到您的服务器完成当前客户端的处理。在这个实验中,您将扩展您的拼写检查程序,同时支持多个客户端。
服务器会设置插座,等客户
当客户端收到服务器会创建一个线程来处理客户端的请求。
服务器将继续等待新的客户端请求。
线程将处理客户的请求,然后退出。 -One common use of sockets is to facilitate a distributed workload system such that a slow client machine can make a computationally intensive request of a faster server machine via the network and sockets.The goal of this project is to write both a client and a server that together create such a system. The program flow could resemble the following:
The client will request the input of a word the user via stdin
1.This word will be transferred to the server over a socket connection.
2.The server will check the word for proper spelling and return a response that the word was spelled correctly, or a response that the word was spelled incorrectly.
3.The client will then display a formatted result of the server s response to the user. For example, a message stating, The word - is spelled correctly. or The word - is spelled correctly.
Your code for step1 was designed to support multiple clients, but one client at a time. You kept clients waiting until your server finished h
客户端将请求一个词从用户通过标准输入输入
1这个字将被传送到服务器上的套接字连接。
2、服务器将检查单词的正确拼写和返回一个响应,该单词拼写正确,或一个响应,该单词拼写错误。
3客户端将显示服务器对用户的响应的格式化结果。例如,一个消息说,“这个词 -拼写正确。”或“单词 -拼写正确。
你的代码的第一步是设计来支持多个客户端,但客户端一次。您保持客户端等待,直到您的服务器完成当前客户端的处理。在这个实验中,您将扩展您的拼写检查程序,同时支持多个客户端。
服务器会设置插座,等客户
当客户端收到服务器会创建一个线程来处理客户端的请求。
服务器将继续等待新的客户端请求。
线程将处理客户的请求,然后退出。 -One common use of sockets is to facilitate a distributed workload system such that a slow client machine can make a computationally intensive request of a faster server machine via the network and sockets.The goal of this project is to write both a client and a server that together create such a system. The program flow could resemble the following:
The client will request the input of a word the user via stdin
1.This word will be transferred to the server over a socket connection.
2.The server will check the word for proper spelling and return a response that the word was spelled correctly, or a response that the word was spelled incorrectly.
3.The client will then display a formatted result of the server s response to the user. For example, a message stating, The word - is spelled correctly. or The word - is spelled correctly.
Your code for step1 was designed to support multiple clients, but one client at a time. You kept clients waiting until your server finished h
(系统自动生成,下载前可以参看下载内容)
下载文件列表
hw6\client
...\client.c
...\common.h
...\makefile
...\server
...\server.c
hw6