stressclient.pi3

来自「mini http server,可以集成嵌入到程序中,实现简单的web功能」· PI3 代码 · 共 69 行

PI3
69
字号
#!../bin/Pi3

# Include  standard IO and server stuff
include ../Conf/IO.cnf
include ../Conf/Server.cnf
include ../Conf/StressClient.cnf

# ---
#
# IO Object for main listening socket.
#
# ---
<Object>
	Name ClientIOObject
	Class TCPIPIOClass
	Type Active
	BindHost localhost
	BindPort 80
	AcceptTimeout 1000
	RecvTimeout 300
	SendTimeout 300
	PeerIPVariable STRING:RemoteAddr
	PeerHostNameVariable STRING:RemoteHost
	LocalAddressVariable STRING:LocalAddr
	ServerPortVariable RFC822:ServerPort
	Flags OwnDB|SetPeerAddress|SetLocalAddress
</Object>

<Object>
	Name ThreadPoolDispatcher
	Class MultiThreadedIOServerClass
	IOObject ClientIOObject
	LogicObject StressClient
	MaxThreads 5
	ExitAfter 1000
</Object>

<Object>
	Name Main
	Class UNIXDaemonClass
	ServerObject ThreadPoolDispatcher
	PIDFile "../Logs/pid.log"
	RLimitCpu Maximum

# User that child processes will run as. Server must run as root to 
# be able to change to the specified user. A user id number can be
# specified with #number. Server which start with root privileges should
# change to a user id with lesser privileges for security reasons.
#   User nobody

# Group that child processes will run as. Server must run as root to
# be able to change to a different group. A group id number can be
# specified with #number.
#   Group #-1

# generate a server unique lockfile name and write it into
# Logs/lockfile.txt
	LockFileName "../Logs/lockfile.txt"

# Message to write just before the server is ready to start accepting
# connections.
# default
	Message "Pi3Web stress test client started"

# Specify the number of processes. 
	NumberOfProcesses 5

</Object>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?