Top Level Namespace
- Includes:
- WEBrick
Defined Under Namespace
Modules: Tidy Classes: BwLimiter, BwLimiterProxy, ConstantBwLimiter, DemoConfig, FalseClass, Fixnum, Float, Hash, String, TidyProject, TrueClass
Constant Summary collapse
- LPORT =
(hopts["--lport"] || 8119).to_i
- LHOST =
hopts["--lhost"] || "localhost"
- OUTGOING_RATE =
hopts["--outgoing-rate-byte"].to_i
- INCOMING_RATE =
hopts["--incoming-rate-byte"].to_i
- IS_GLOBAL_LIMIT =
if hopts["--global-limit"] then true else false end
- TICKS =
(hopts["--ticks"] || 100).to_i
- RHOST =
- RPORT =
ARGV[1].to_i
Instance Method Summary collapse
Instance Method Details
#print_help ⇒ Object
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/tidy/bwlimit.rb', line 212 def print_help puts " # \#{$0} [options] rhost rport\n #\n # --lhost x listen to the interface x (def: localhost)\n # --lport x listen to port x (def: 8119)\n # --outgoing-rate x\n # -o x output at x KBps (def: 5)\n # --incoming-rate x\n # -i x accepts input at xKBps (def: 5)\n # --global-limit\n # -g if set, the rate is for total rate (def: the rate is per connection)\n # --ticks\n # -t ticks per second, higher more accurate but consumes more cpu (def: 100)\n # --help\n # -h this page\n # rhost host to connect to\n # rport port to connect to\n EOF\nend\n" |