|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--SSF.OS.ProtocolSession
|
+--SSF.App.DDoS.httpServer_WM
A simple HTTP server traffic generator. The server configures itself from the DML file. After receiving an httpRequest, the server spawns a slave server that first sends an httpResponse, and then sends the virtual data to the client until the request is fulfilled, and possibly closes the TCP connection if the httpRequest contained the CLOSE directive.
The default is no limit on the number of clients, unless the attribute client_limit is set.
There is no limit on the number of servers that can coexist in a single Host as long as each httpServer has a distinct wellKnownPort number.
It's modified from httpServer to support monitors.
| Field Summary |
| Fields inherited from class SSF.OS.ProtocolSession |
name, use |
| Constructor Summary | |
httpServer_WM()
Constructors |
|
| Method Summary | |
void |
config(com.renesys.raceway.DML.Configuration cfg)
httpServer configuration. |
boolean |
getMonitorEnable()
An ProtocolMonitor may inquire if IP calls to its receive() are enabled |
void |
init()
Start the server |
boolean |
push(ProtocolMessage message,
ProtocolSession fromSession)
Routine to call when a message is being sent to ("pushed into") this ProtocolSession by another ProtocolSession. |
void |
serv()
httpServer configuration. |
void |
setMonitorEnable(boolean en)
An ProtocolMonitor may turn on and off calls to its receive() method. |
| Methods inherited from class SSF.OS.ProtocolSession |
close, closed, debugIdentifier, inGraph, open, opened, pushAfterDelay, pushAfterDelayFailed, setGraph, version |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public httpServer_WM()
| Method Detail |
public void config(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
ProtocolSession [ name server use SSF.OS.WWW.httpServer
port 80 # server's HTTP port
client_limit 10 # max number of simultaneous established client
# connections, if omitted, default is unlimited.
# If exceeded, connection request is ignored
# and left to time out.
queue_limit 5 # maximum size of pending connection request
# queue, Qlimit, if omitted default is 5.
# Determines the total number of pending
# connection requests (see SSF.OS.TCP.tcpSocket).
# If exceeded, the listening socket sends RESET
# to client and drops the request.
# distribution of the number of objects in a page request:
# if random variable = 0, round up to 1
# NOTE: the response to page request contains the 1st object
objects_in_page [
distribution [
name "Pareto" # distribution class name
k 0.6667 # scale (cutoff) parameter
alpha 1.2 # shape (exponent) parameter
]
]
# distribution of sizes of objects (in bytes)
# if random variable = 0, round up to 1
object_size [
distribution [
name "Pareto" # distribution class name
k 2000.0 # scale (cutoff) parameter
alpha 1.2 # shape (exponent) parameter
]
]
# distribution of server delays between request and response (in seconds)
# NOT IMPLEMENTED
response_delay [
distribution [
name "Exponential" # distribution class name
lambda 10.0 # mean = 1/lambda
]
]
http_hdr_size 1000 # nominal HTTP header size (virtual bytes) read from a socket
# before reading data (if indicated by http header)
show_report true # print client-server session summary report
debug false # print verbose client/server diagnostics
# BELOW IS ADDED FOR MONITOR
monitor [
use SSF.OS.WWW.RequestsMonitor
probe_interval 3.0
debug false
]
]
config in interface com.renesys.raceway.DML.Configurableconfig in class ProtocolSessioncom.renesys.raceway.DML.configExceptionpublic void init()
init in class ProtocolSession
public boolean push(ProtocolMessage message,
ProtocolSession fromSession)
throws ProtocolException
ProtocolSessionIf you desire "safe" interaction with other CPU activities, even though your push() consumes no measurable/modelable CPU cycles, define the "cpudelay true" attribute for the ProtocolGraph and use pushAfterDelay(message,fromSession,0.0). This will guarantee proper ordering; that is, the framework will wait until the CPU is free before proceeding with the requested push().
push in class ProtocolSessionProtocolExceptionpublic void serv()
ProtocolSession [ name server use SSF.OS.WWW.httpServer_WM
port 80 # server's HTTP port
client_limit 10 # max number of contemporaneously allowed clients
# if omitted, default is unlimited number
# distribution of the number of objects in a page request:
# if random variable = 0, round up to 1
# NOTE: the response to page request contains the 1st object
objects_in_page [
distribution [
name "Pareto" # distribution class name
k 0.6667 # scale (cutoff) parameter
alpha 1.2 # shape (exponent) parameter
]
]
# distribution of sizes of objects (in bytes)
# if random variable = 0, round up to 1
object_size [
distribution [
name "Pareto" # distribution class name
k 2000.0 # scale (cutoff) parameter
alpha 1.2 # shape (exponent) parameter
]
]
# distribution of server delays between request and response (in seconds)
# NOT IMPLEMENTED
response_delay [
distribution [
name "Exponential" # distribution class name
lambda 10.0 # mean = 1/lambda
]
]
http_hdr_size 1000 # nominal HTTP header size (virtual bytes) read from a socket
# before reading data (if indicated by http header)
show_report true # print client-server session summary report
debug false # print verbose client/server diagnostics
* # BELOW IS ADDED FOR MONITOR
monitor [
use SSF.OS.WWW.RequestsMonitor
probe_interval 3.0
debug false
]
]
public void setMonitorEnable(boolean en)
public boolean getMonitorEnable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||