Class: Thin::Glazed::Server

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/thin/glazed/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, port, client_port) ⇒ Server

Returns a new instance of Server.



6
7
8
# File 'lib/thin/glazed/server.rb', line 6

def initialize(host, port, client_port)
  @host, @port, @client_port = host, port, client_port
end

Instance Attribute Details

#client_portObject (readonly)

Returns the value of attribute client_port.



4
5
6
# File 'lib/thin/glazed/server.rb', line 4

def client_port
  @client_port
end

#hostObject (readonly)

Returns the value of attribute host.



4
5
6
# File 'lib/thin/glazed/server.rb', line 4

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port.



4
5
6
# File 'lib/thin/glazed/server.rb', line 4

def port
  @port
end

Instance Method Details

#startObject



10
11
12
13
14
15
16
# File 'lib/thin/glazed/server.rb', line 10

def start
  log ">> Thin::Glazed HTTPS Proxy (v#{Thin::Glazed::VERSION})"
  log ">> Listening on #{host}:#{port}"

  EventMachine.start_server host, port, Thin::Glazed::HttpsGlazing,
    client_port
end