Class: Puppeteer::WebSocket::DriverImpl::SecureSocketFactory
- Inherits:
-
Object
- Object
- Puppeteer::WebSocket::DriverImpl::SecureSocketFactory
- Defined in:
- lib/puppeteer/web_socket.rb
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(host, port) ⇒ SecureSocketFactory
constructor
A new instance of SecureSocketFactory.
Constructor Details
#initialize(host, port) ⇒ SecureSocketFactory
Returns a new instance of SecureSocketFactory.
10 11 12 13 |
# File 'lib/puppeteer/web_socket.rb', line 10 def initialize(host, port) @host = host @port = port || 443 end |
Instance Method Details
#create ⇒ Object
15 16 17 18 |
# File 'lib/puppeteer/web_socket.rb', line 15 def create tcp_socket = TCPSocket.new(@host, @port) OpenSSL::SSL::SSLSocket.new(tcp_socket).tap(&:connect) end |