Class: Bane::Behaviors::Servers::ResponderServer

Inherits:
GServer
  • Object
show all
Defined in:
lib/bane/behaviors/servers/responder_server.rb

Instance Method Summary collapse

Constructor Details

#initialize(port, behavior, host = Servers::LOCALHOST) ⇒ ResponderServer

Returns a new instance of ResponderServer.



11
12
13
14
15
# File 'lib/bane/behaviors/servers/responder_server.rb', line 11

def initialize(port, behavior, host = Servers::LOCALHOST)
  super(port, host)
  @behavior = behavior
  self.audit = true
end

Instance Method Details

#serve(io) ⇒ Object



17
18
19
# File 'lib/bane/behaviors/servers/responder_server.rb', line 17

def serve(io)
  @behavior.serve(io)
end

#to_sObject



21
22
23
# File 'lib/bane/behaviors/servers/responder_server.rb', line 21

def to_s
  "<Bane::BehaviorServer: port=#{@port}, behavior=#{@behavior.class}>"
end