Class: MiddleSquid::Backends::Thin

Inherits:
Thin::Backends::TcpServer
  • Object
show all
Defined in:
lib/middle_squid/backends/thin.rb

Overview

Exposes the signature of Thin’s TCP socket.

Examples:

Extract the current host and port

sockname = EM.get_sockname @thin.backend.signature
@port, @host = Socket.unpack_sockaddr_in sockname

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, port, options) ⇒ Thin

Returns a new instance of Thin.



10
11
12
# File 'lib/middle_squid/backends/thin.rb', line 10

def initialize(host, port, options)
  super host, port
end

Instance Attribute Details

#signatureObject (readonly)

Returns the value of attribute signature.



8
9
10
# File 'lib/middle_squid/backends/thin.rb', line 8

def signature
  @signature
end