cfillion/middle_squid

View on GitHub
lib/middle_squid/backends/thin.rb

Summary

Maintainability
A
0 mins
Test Coverage
module MiddleSquid::Backends
  # Exposes the signature of Thin's TCP socket.
  #
  # @example Extract the current host and port
  #   sockname = EM.get_sockname @thin.backend.signature
  #   @port, @host = Socket.unpack_sockaddr_in sockname
  class Thin < Thin::Backends::TcpServer
    attr_reader :signature

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