文件名称:socket-server-socket-serve
介绍说明--下载内容来自于网络,使用问题请自行百度
这是一个关于各种IO模型的socket server实现与测试。
这里采用多种模型实现了一个TCP ECHO服务器,将client发送的内容echo回去。
client每秒会发送一次请求,server保持并发连接并进行相应。
现已实现的模型:
base: 最原始的echo服务器
thread: 多线程模型
select: select模型
poll: poll模型
epoll: epoll模型
参数
修改src/clients.sh 可以生成指定数量的client
修改src/base.cpp 中的MAX_CLIENT_NUM参数调整server最大服务数
修改src/base.cpp 中的CLIENT_INTERVAL参数调整client发包间隔
修改Makefile 中的DEBUG参数确定是否输出调试信息
使用方法(This is a socket server implementation and testing of various IO models.
Here, a variety of models are used to implement a TCP ECHO server that returns the contents sent by echo back to client.
Client sends a request per second, and server maintains concurrent connections and performs them accordingly.
The model has been implemented:
Base: the most primitive echo server
Thread: multithreaded model
Select: select model
Poll: poll model
Epoll: epoll model
parameter
Modify src/clients.sh to generate a specified number of client
Modify the MAX_CLIENT_NUM parameter in src/base.cpp to adjust the maximum number of server services
Modify the CLIENT_INTERVAL parameter in src/base.cpp to adjust the client contract interval
Modify the DEBUG parameter in the Makefile to determine whether output debugging information is out
Usage method)
这里采用多种模型实现了一个TCP ECHO服务器,将client发送的内容echo回去。
client每秒会发送一次请求,server保持并发连接并进行相应。
现已实现的模型:
base: 最原始的echo服务器
thread: 多线程模型
select: select模型
poll: poll模型
epoll: epoll模型
参数
修改src/clients.sh 可以生成指定数量的client
修改src/base.cpp 中的MAX_CLIENT_NUM参数调整server最大服务数
修改src/base.cpp 中的CLIENT_INTERVAL参数调整client发包间隔
修改Makefile 中的DEBUG参数确定是否输出调试信息
使用方法(This is a socket server implementation and testing of various IO models.
Here, a variety of models are used to implement a TCP ECHO server that returns the contents sent by echo back to client.
Client sends a request per second, and server maintains concurrent connections and performs them accordingly.
The model has been implemented:
Base: the most primitive echo server
Thread: multithreaded model
Select: select model
Poll: poll model
Epoll: epoll model
parameter
Modify src/clients.sh to generate a specified number of client
Modify the MAX_CLIENT_NUM parameter in src/base.cpp to adjust the maximum number of server services
Modify the CLIENT_INTERVAL parameter in src/base.cpp to adjust the client contract interval
Modify the DEBUG parameter in the Makefile to determine whether output debugging information is out
Usage method)
相关搜索: socket
(系统自动生成,下载前可以参看下载内容)
下载文件列表
socket-server-master
socket-server-master\.gitignore
socket-server-master\.travis.yml
socket-server-master\Dockerfile
socket-server-master\LICENSE
socket-server-master\Makefile
socket-server-master\README.md
socket-server-master\src
socket-server-master\src\base.cpp
socket-server-master\src\base.h
socket-server-master\src\base_server.cpp
socket-server-master\src\client.cpp
socket-server-master\src\clients.sh
socket-server-master\src\epoll_server.cpp
socket-server-master\src\poll_server.cpp
socket-server-master\src\select_server.cpp
socket-server-master\src\thread_server.cpp
socket-server-master\.gitignore
socket-server-master\.travis.yml
socket-server-master\Dockerfile
socket-server-master\LICENSE
socket-server-master\Makefile
socket-server-master\README.md
socket-server-master\src
socket-server-master\src\base.cpp
socket-server-master\src\base.h
socket-server-master\src\base_server.cpp
socket-server-master\src\client.cpp
socket-server-master\src\clients.sh
socket-server-master\src\epoll_server.cpp
socket-server-master\src\poll_server.cpp
socket-server-master\src\select_server.cpp
socket-server-master\src\thread_server.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.