Class: Bane::Behaviors::CloseAfterPause
- Inherits:
-
BasicBehavior
- Object
- BasicBehavior
- Bane::Behaviors::CloseAfterPause
- Defined in:
- lib/bane/behaviors.rb
Overview
Accepts a connection, pauses a fixed duration, then closes the connection.
Options:
- duration: The number of seconds to wait before disconnect. Default: 30
Instance Method Summary collapse
Methods inherited from BasicBehavior
Instance Method Details
#serve(io, options) ⇒ Object
38 39 40 41 42 |
# File 'lib/bane/behaviors.rb', line 38 def serve(io, ) = {:duration => 30}.merge() sleep([:duration]) end |