Class: Sanford::Server
- Inherits:
-
Object
- Object
- Sanford::Server
- Includes:
- DatTCP::Server
- Defined in:
- lib/sanford/server.rb
Defined Under Namespace
Classes: Connection
Instance Attribute Summary collapse
-
#host_data ⇒ Object
readonly
Returns the value of attribute host_data.
Instance Method Summary collapse
-
#initialize(host, options = {}) ⇒ Server
constructor
A new instance of Server.
- #inspect ⇒ Object
- #name ⇒ Object
-
#serve(socket) ⇒ Object
‘serve` can be called at the same time by multiple threads.
Constructor Details
Instance Attribute Details
#host_data ⇒ Object (readonly)
Returns the value of attribute host_data.
12 13 14 |
# File 'lib/sanford/server.rb', line 12 def host_data @host_data end |
Instance Method Details
#inspect ⇒ Object
29 30 31 32 |
# File 'lib/sanford/server.rb', line 29 def inspect reference = '0x0%x' % (self.object_id << 1) "#<#{self.class}:#{reference} @service_host=#{@host_data.inspect}>" end |
#name ⇒ Object
19 20 21 |
# File 'lib/sanford/server.rb', line 19 def name @host_data.name end |