Class: WEBrick::SNIRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/webrick/https.rb

Overview

– Fake WEBrick::HTTPRequest for lookup_server

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sslsocket, hostname) ⇒ SNIRequest

Creates a new SNIRequest.



113
114
115
116
117
# File 'lib/webrick/https.rb', line 113

def initialize(sslsocket, hostname)
  @host = hostname
  @addr = sslsocket.addr
  @port = @addr[1]
end

Instance Attribute Details

#addrObject (readonly)

The socket address of the server



103
104
105
# File 'lib/webrick/https.rb', line 103

def addr
  @addr
end

#hostObject (readonly)

The SNI hostname



98
99
100
# File 'lib/webrick/https.rb', line 98

def host
  @host
end

#portObject (readonly)

The port this request is for



108
109
110
# File 'lib/webrick/https.rb', line 108

def port
  @port
end