文件名称:socket
-
所属分类:
- 标签属性:
- 上传时间:2016-07-05
-
文件大小:9.14kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
一个常见的使用套接字是为了方便一个分布式的负载系统,例如,一个缓慢的客户端机器可以通过网络和套接字的快速服务器机的计算密集型的请求,这个项目的目标是写一个客户端和一个服务器,一起创建这样的系统。程序流程可能类似于下面的:
客户端将请求一个词从用户通过标准输入输入
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
hw6/client.c
hw6/common.h
hw6/makefile
hw6/server
hw6/server.c
hw6
hw6/client.c
hw6/common.h
hw6/makefile
hw6/server
hw6/server.c
hw6
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.